Browse Source

Include @everyone role within Guild.get_permissions (fixes #30)

Previouslly this was ommited erroneously
pull/27/merge
Andrei 8 years ago
parent
commit
9fdfecd7f7
  1. 3
      disco/types/guild.py

3
disco/types/guild.py

@ -350,7 +350,8 @@ class Guild(SlottedModel, Permissible):
value = PermissionValue(self.roles.get(self.id).permissions) value = PermissionValue(self.roles.get(self.id).permissions)
for role in map(self.roles.get, member.roles): # Iterate over all roles the user has (plus the @everyone role)
for role in map(self.roles.get, member.roles + [self.id]):
value += role.permissions value += role.permissions
return value return value

Loading…
Cancel
Save