diff options
| author | Rapptz <[email protected]> | 2015-10-22 22:11:13 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-10-22 22:20:35 -0400 |
| commit | 6981c51e0ac2608a2cfd249d973d36b0cc0c547f (patch) | |
| tree | 10b44792c35c8787e99fdc5b2de0887983f8050c | |
| parent | Add Client.delete_channel_permissions (diff) | |
| download | discord.py-6981c51e0ac2608a2cfd249d973d36b0cc0c547f.tar.xz discord.py-6981c51e0ac2608a2cfd249d973d36b0cc0c547f.zip | |
Change default parameter to None for Client.set_channel_permissions
| -rw-r--r-- | discord/client.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py index ecb2f132..83cad29f 100644 --- a/discord/client.py +++ b/discord/client.py @@ -1205,7 +1205,7 @@ class Client(object): return None - def set_channel_permissions(self, channel, target, allow=Permissions.none(), deny=Permissions.none()): + def set_channel_permissions(self, channel, target, allow=None, deny=None): """Sets the channel specific permission overwrites for a target in the specified :class:`Channel`. @@ -1231,6 +1231,9 @@ class Client(object): url = '{0}/{1.id}/permissions/{2.id}'.format(endpoints.CHANNELS, channel, target) + allow = Permissions.none() if allow is None else allow + deny = Permissions.none() if deny is None else deny + if not (isinstance(allow, Permissions) and isinstance(deny, Permissions)): raise TypeError('allow and deny parameters must be discord.Permissions') |