mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-10-28 15:59:04 +00:00
[commands] Fix NameError in bot_has_permissions.
This commit is contained in:
1 parent
f49dc81adf
commit
6a31f6af1e
1 file changed
+1
-1
@@ -840,7 +840,7 @@ def bot_has_permissions(**perms):
|
||||
"""
|
||||
def predicate(ctx):
|
||||
ch = ctx.message.channel
|
||||
me = msg.server.me if not ch.is_private else ctx.bot.user
|
||||
me = ch.server.me if not ch.is_private else ctx.bot.user
|
||||
permissions = ch.permissions_for(me)
|
||||
return all(getattr(permissions, perm, None) == value for perm, value in perms.items())
|
||||
return check(predicate)
|
||||
Reference in new issue
Block a user