mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-10-29 16:09:05 +00:00
[commands] bot_has_permissions decorator actually checks for bot.
This commit is contained in:
1 parent
3802e7f534
commit
f49dc81adf
1 file changed
+1
-1
@@ -841,6 +841,6 @@ 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
|
||||
permissions = ch.permissions_for(msg.author)
|
||||
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