Answer the question
In order to leave comments, you need to log in
How to check the rights of the bot?
Somewhere I saw a permission check using if, now I'm trying to find it but I can't find anything
I tried:
if commands.bot_has_guild_permissions == 'administration':
await ctx.reply('У меня не хватает права `administrator`')
Answer the question
In order to leave comments, you need to log in
I found the answer to my question:
@commands.bot_has_permissions(manage_messages=True)
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, commands.BotMissingPermissions):
await ctx.reply(embed = discord.Embed(title=f'Ошибка',description=f'Извини, но у меня нет прав!', colour = discord.Color.red()))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question