1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-16 02:39:01 +00:00

[commands] bot_has_permissions decorator actually checks for bot.

This commit is contained in:
Rapptz 2016-03-02 21:54:56 -05:00
parent 3802e7f534
commit f49dc81adf

@ -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)