aboutsummaryrefslogtreecommitdiff
path: root/discord/channel.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-10-22 21:24:00 -0400
committerRapptz <[email protected]>2015-10-22 22:20:34 -0400
commitb94dffaf87dbf05a98fb8c052e65d304b827a7d8 (patch)
tree114f429dd17f27eca9d2c8e1b2037166191539c4 /discord/channel.py
parentChange Colour constants to be class method factories instead. (diff)
downloaddiscord.py-b94dffaf87dbf05a98fb8c052e65d304b827a7d8.tar.xz
discord.py-b94dffaf87dbf05a98fb8c052e65d304b827a7d8.zip
Change Permissions constants to be class method factories instead.
Diffstat (limited to 'discord/channel.py')
-rw-r--r--discord/channel.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 7f8d23eb..3d0c2481 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -133,7 +133,7 @@ class Channel(object):
# and then the allowed.
if member.id == self.server.owner.id:
- return Permissions.ALL
+ return Permissions.all()
default = self.server.get_default_role()
base = deepcopy(default.permissions)
@@ -144,7 +144,7 @@ class Channel(object):
# Server-wide Manage Roles -> True for everything
if base.can_manage_roles:
- base = Permissions.ALL
+ base = Permissions.all()
member_role_ids = set(map(lambda r: r.id, member.roles))
@@ -160,7 +160,8 @@ class Channel(object):
if base.can_manage_roles:
# This point is essentially Channel-specific Manage Roles.
- base.value |= Permissions.ALL_CHANNEL.value
+ tmp = Permissions.all_channel()
+ base.value |= tmp.value
if self.is_default_channel():
base.can_read_messages = True