From d572e593b6118421ca28230a19e0e7c660d9a077 Mon Sep 17 00:00:00 2001 From: bmintz Date: Mon, 30 Jul 2018 19:04:43 -0500 Subject: [PATCH] cogs/emoji.__local_check: fix error message - also fail when user has perms but bot doesn't - clarify this in the error message --- cogs/emoji.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cogs/emoji.py b/cogs/emoji.py index 7c17c8d..f8b0c3d 100644 --- a/cogs/emoji.py +++ b/cogs/emoji.py @@ -52,11 +52,14 @@ class Emotes: f'{utils.SUCCESS_EMOTES[False]} Sorry, this command may only be used in a server.') return False - if not context.author.guild_permissions.manage_emojis: + if ( + not context.author.guild_permissions.manage_emojis + or not context.guild.me.guild_permissions.manage_emojis + ): await context.send( f'{utils.SUCCESS_EMOTES[False]} ' "Sorry, you don't have enough permissions to run this command. " - 'You need the Manage Emojis permission.') + 'You and I both need the Manage Emojis permission.') return False return True