Closed flaree closed 1 week ago
would adding a check before running any command in bot.py, that would have something like permissions = channel.permissions missing_permissions = [] if not permissions.send_messages: missing_permissions.append('send messages') for every permission that is needed for the bot to run properly solve this issue?
would adding a check before running any command in bot.py, that would have something like
permissions = channel.permissions missing_permissions = [] if not permissions.send_messages: missing_permissions.append('send messages')
for every permission that is needed for the bot to run properly solve this issue?
No, you need to catch the error in the handler
This error is thrown specifically for BotMissingPermissions https://discordpy.readthedocs.io/en/stable/interactions/api.html?highlight=botmissingpermission#discord.app_commands.BotMissingPermissions which shows the permissions it requires
The generic the bot doesn't have permission to do something or you can not run this command checks need to be expanded upon and elaborated further.
bot has permissions check should return the missing permissions, some other stuff should fail more silently