aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-03-15 23:13:28 -0400
committerRapptz <[email protected]>2017-03-15 23:13:28 -0400
commit0321558decb4669a97eb9b69b1f9dbe12b9e2f32 (patch)
tree7eaa6bd4ba5526fb69cb51bcc0b7dd82a557e8b5
parentSpeed up message update handling. (diff)
downloaddiscord.py-0321558decb4669a97eb9b69b1f9dbe12b9e2f32.tar.xz
discord.py-0321558decb4669a97eb9b69b1f9dbe12b9e2f32.zip
Handle case when guild owner somehow doesn't exist in permissions_for
-rw-r--r--discord/abc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/abc.py b/discord/abc.py
index d0ddd42d..0ad5b5a8 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -296,7 +296,8 @@ class GuildChannel:
# The operation first takes into consideration the denied
# and then the allowed.
- if member.id == self.guild.owner.id:
+ o = self.guild.owner
+ if o is not None and member.id == o.id:
return Permissions.all()
default = self.guild.default_role