diff --git a/disco/types/channel.py b/disco/types/channel.py index 904cf32..64b79ce 100644 --- a/disco/types/channel.py +++ b/disco/types/channel.py @@ -123,7 +123,7 @@ class Channel(SlottedModel, Permissible): type = Field(enum(ChannelType)) guild_id = Field(snowflake) position = Field(int) - permission_overwrites = AutoDictField(PermissionOverwrite, 'id', alias='permission_overwrites') + overwrites = AutoDictField(PermissionOverwrite, 'id', alias='permission_overwrites') name = Field(text) topic = Field(text) nsfw = Field(bool) @@ -144,7 +144,7 @@ class Channel(SlottedModel, Permissible): def after_load(self): # TODO: hackfix - self.attach(six.itervalues(self.permission_overwrites), {'channel_id': self.id, 'channel': self}) + self.attach(six.itervalues(self.overwrites), {'channel_id': self.id, 'channel': self}) def __str__(self): return u'#{}'.format(self.name) if self.name else six.text_type(self.id) @@ -168,18 +168,18 @@ class Channel(SlottedModel, Permissible): base = self.guild.get_permissions(member) # First grab and apply the everyone overwrite - everyone = self.permission_overwrites.get(self.guild_id) + everyone = self.overwrites.get(self.guild_id) if everyone: base -= everyone.deny base += everyone.allow for role_id in member.roles: - overwrite = self.permission_overwrites.get(role_id) + overwrite = self.overwrites.get(role_id) if overwrite: base -= overwrite.deny base += overwrite.allow - ow_member = self.permission_overwrites.get(member.user.id) + ow_member = self.overwrites.get(member.user.id) if ow_member: base -= ow_member.deny base += ow_member.allow diff --git a/disco/types/guild.py b/disco/types/guild.py index 80fedc0..c58dbcc 100644 --- a/disco/types/guild.py +++ b/disco/types/guild.py @@ -387,7 +387,6 @@ class Guild(SlottedModel, Permissible): voice_states = AutoDictField(VoiceState, 'session_id') members = AutoDictField(GuildMember, 'id') channels = AutoDictField(Channel, 'id') - presences = Field(enum(Presence)) max_presences = Field(int, default=5000) max_members = Field(int) vanity_url_code = Field(text) diff --git a/disco/types/permissions.py b/disco/types/permissions.py index e60c120..b4f5f7d 100644 --- a/disco/types/permissions.py +++ b/disco/types/permissions.py @@ -11,7 +11,8 @@ class Permissions(object): ADD_REACTIONS = 1 << 6 VIEW_AUDIT_LOG = 1 << 7 PRIORITY_SPEAKER = 1 << 8 - READ_MESSAGES = 1 << 10 + STREAM = 1 << 9 + VIEW_CHANNEL = 1 << 10 SEND_MESSAGES = 1 << 11 SEND_TSS_MESSAGES = 1 << 12 MANAGE_MESSAGES = 1 << 13