#how to issue a timeout
1 messages · Page 1 of 1 (latest)
Many times I tried to find the code for the timeout, but could not, not one works...
так же был код py @bot.slash_command(name='timeout', description='timeouts a user for a specific time') @commands.has_permissions(moderate_members=True) async def timeout(interaction, member: disnake.Member, seconds: int = 0, minutes: int = 0, hours: int = 0, days: int = 0, reason=None): duration=datetime.timedelta(seconds=seconds, minutes=minutes, hours= hours, days=days) await member.timeout(duration, reason=reason) await interaction.response.send_message(f'{member.mention} was timeouted until for {duration}', ephemeral=True)
It's just so much time and no one has helped me(
try .timeout(duration=duration), you need to explicitly specify the kwarg
Trying