diff --git a/disco/types/channel.py b/disco/types/channel.py index 0ef5f7a..3e84a9e 100644 --- a/disco/types/channel.py +++ b/disco/types/channel.py @@ -168,16 +168,11 @@ class Channel(SlottedModel, Permissible): base -= everyone.deny base += everyone.allow - denies = 0 - allows = 0 for role_id in member.roles: overwrite = self.overwrites.get(role_id) if overwrite: - denies |= overwrite.deny - allows |= overwrite.allow - - base -= denies - base += allows + base -= overwrite.deny + base += overwrite.allow ow_member = self.overwrites.get(member.user.id) if ow_member: diff --git a/disco/types/permissions.py b/disco/types/permissions.py index 6157bd9..d11b08f 100644 --- a/disco/types/permissions.py +++ b/disco/types/permissions.py @@ -66,7 +66,7 @@ class PermissionValue(object): if isinstance(other, PermissionValue): self.value &= ~other.value elif isinstance(other, int): - self.value &= other + self.value &= ~other elif isinstance(other, EnumAttr): setattr(self, other.name, False) else: