From 3285dd03bc78cff35ebd8e5af3818ae0e65c6fa1 Mon Sep 17 00:00:00 2001 From: onerandomusername Date: Wed, 29 Sep 2021 03:00:43 -0400 Subject: [PATCH] fix: make requested comment changes --- modmail/extensions/utils/error_handler.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modmail/extensions/utils/error_handler.py b/modmail/extensions/utils/error_handler.py index f487e221..02b059f2 100644 --- a/modmail/extensions/utils/error_handler.py +++ b/modmail/extensions/utils/error_handler.py @@ -78,7 +78,8 @@ async def handle_bot_missing_perms( not_responded = False elif bot_perms >= discord.Permissions(send_messages=True): # make a message as similar to the embed, using as few permissions as possible - # this is the only place we send a standard message instead of an embed, so no helper methods + # this is the only place we send a standard message instead of an embed + # so no helper methods are necessary await ctx.send( "**Permissions Failure**\n\n" "I am missing the permissions required to properly execute your command." @@ -123,7 +124,9 @@ async def handle_check_failure( elif isinstance(error, commands.NoPrivateMessage): title = "Server Only" elif isinstance(error, commands.BotMissingPermissions): - # defer handling BotMissingPermissions to a method, since this can be problematic + # defer handling BotMissingPermissions to a method + # the error could be that the bot is unable to send messages, which would cause + # the error handling to fail await self.handle_bot_missing_perms(ctx, error) return None else: