Answer the question
In order to leave comments, you need to log in
Help, I made a clear command and I need people with a certain right to be able to use it?
Help, I made the clear command, but I don’t know what right the
code is responsible for managing messages:
@bot.command()
@commands.has_permissions(manage_message=True)
async def clear( ctx, amout = 100 ):
time = 2
await ctx.channel.purge( limit = amout + 1 )
await ctx.send( f'>>> *Очистка* \n Было очищенно { amout } сообщение(ий)' )
await asyncio.sleep(time)
await ctx.channel.purge( limit = 1 )
Answer the question
In order to leave comments, you need to log in
Read the has_permissions documentation .
The permissions passed in must be exactly like the properties shown under discord.Permissions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question