mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
[commands] Fix NameError in bot_has_permissions.
This commit is contained in:
parent
f49dc81adf
commit
6a31f6af1e
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user