mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-16 18:59:09 +00:00
Fix Channel.permissions_for attribute error.
This commit is contained in:
parent
51d91c2a82
commit
5f4e13df96
@ -164,7 +164,7 @@ class Channel(Hashable):
|
||||
if member.id == self.server.owner.id:
|
||||
return Permissions.all()
|
||||
|
||||
default = member.roles[0]
|
||||
default = self.server.default_role
|
||||
base = deepcopy(default.permissions)
|
||||
|
||||
# Apply server roles that the member has.
|
||||
@ -193,7 +193,7 @@ class Channel(Hashable):
|
||||
tmp = Permissions.all_channel()
|
||||
base.value |= tmp.value
|
||||
|
||||
if self.is_default_channel():
|
||||
if self.is_default:
|
||||
base.can_read_messages = True
|
||||
|
||||
return base
|
||||
|
Loading…
x
Reference in New Issue
Block a user