diff options
| author | Rapptz <[email protected]> | 2016-03-02 23:18:47 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-03-02 23:18:47 -0500 |
| commit | 6a31f6af1ea35209a6a3cf40bf22a84e78497988 (patch) | |
| tree | e72273bdd3d5a03a71a8e60580a52c7df779920f | |
| parent | [commands] bot_has_permissions decorator actually checks for bot. (diff) | |
| download | discord.py-6a31f6af1ea35209a6a3cf40bf22a84e78497988.tar.xz discord.py-6a31f6af1ea35209a6a3cf40bf22a84e78497988.zip | |
[commands] Fix NameError in bot_has_permissions.
| -rw-r--r-- | discord/ext/commands/core.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index c15cbb08..d2e79dd7 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -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) |