aboutsummaryrefslogtreecommitdiff
path: root/discord/channel.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-01-03 21:44:54 -0500
committerRapptz <[email protected]>2016-01-03 21:45:28 -0500
commit5a1d7a2d942c75a2f374b4b0add6ad50fdd227d7 (patch)
tree3cd63bd9d6ac6cd4d1ead371a32166d54533bc28 /discord/channel.py
parentDocument more breaking changes in migrating file. (diff)
downloaddiscord.py-5a1d7a2d942c75a2f374b4b0add6ad50fdd227d7.tar.xz
discord.py-5a1d7a2d942c75a2f374b4b0add6ad50fdd227d7.zip
Change permissions to remove the can_ prefix.
Diffstat (limited to 'discord/channel.py')
-rw-r--r--discord/channel.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/discord/channel.py b/discord/channel.py
index 814e940f..b77afc59 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -172,7 +172,7 @@ class Channel(Hashable):
base.value |= role.permissions.value
# Server-wide Manage Roles -> True for everything
- if base.can_manage_roles:
+ if base.manage_roles:
base = Permissions.all()
member_role_ids = set(map(lambda r: r.id, member.roles))
@@ -188,13 +188,13 @@ class Channel(Hashable):
if overwrite.type == 'member' and overwrite.id == member.id:
base.handle_overwrite(allow=overwrite.allow, deny=overwrite.deny)
- if base.can_manage_roles:
+ if base.manage_roles:
# This point is essentially Channel-specific Manage Roles.
tmp = Permissions.all_channel()
base.value |= tmp.value
if self.is_default:
- base.can_read_messages = True
+ base.read_messages = True
return base
@@ -244,9 +244,9 @@ class PrivateChannel(Hashable):
This returns all the Text related permissions set to true except:
- - can_send_tts_messages: You cannot send TTS messages in a PM.
- - can_manage_messages: You cannot delete others messages in a PM.
- - can_mention_everyone: There is no one to mention in a PM.
+ - send_tts_messages: You cannot send TTS messages in a PM.
+ - manage_messages: You cannot delete others messages in a PM.
+ - mention_everyone: There is no one to mention in a PM.
Parameters
-----------
@@ -259,10 +259,10 @@ class PrivateChannel(Hashable):
The resolved permissions for the user.
"""
- base = Permissions.TEXT
- base.can_send_tts_messages = False
- base.can_manage_messages = False
- base.can_mention_everyone = False
+ base = Permissions.text()
+ base.send_tts_messages = False
+ base.manage_messages = False
+ base.mention_everyone = False
return base