Handle case when guild owner somehow doesn't exist in permissions_for

This commit is contained in:
Rapptz 2017-03-15 23:13:28 -04:00
parent 51b0baeb9d
commit 0321558dec

View File

@ -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