diff options
| author | Rapptz <[email protected]> | 2015-12-19 20:53:31 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-19 20:53:31 -0500 |
| commit | 1ac2f6437f52ad3a875324250e2b56c86a4931b2 (patch) | |
| tree | 2e9a6dad51776b029e0c9e83521363ebdc9f6132 | |
| parent | Add background_task example to showcase background tasks. (diff) | |
| download | discord.py-1ac2f6437f52ad3a875324250e2b56c86a4931b2.tar.xz discord.py-1ac2f6437f52ad3a875324250e2b56c86a4931b2.zip | |
Fix NameError with Permissions missing.
| -rw-r--r-- | discord/client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py index 33491165..8e14e875 100644 --- a/discord/client.py +++ b/discord/client.py @@ -35,6 +35,7 @@ from .object import Object from .role import Role from .errors import * from .state import ConnectionState +from .permissions import Permissions from . import utils from .enums import ChannelType, ServerRegion from .voice_client import VoiceClient @@ -2203,7 +2204,7 @@ class Client: deny = discord.Permissions.none() allow.can_mention_everyone = True deny.can_manage_messages = True - yield from client.set_channel_permissions(message.channel, message.author, allow=allow, deny=deny) + yield from client.edit_channel_permissions(message.channel, message.author, allow=allow, deny=deny) Parameters ----------- @@ -2265,7 +2266,7 @@ class Client: Removes a channel specific permission overwrites for a target in the specified :class:`Channel`. - The target parameter follows the same rules as :meth:`set_channel_permissions`. + The target parameter follows the same rules as :meth:`edit_channel_permissions`. You must have the proper permissions to do this. |