mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-16 10:23:57 +12:00
overwrites reworked in discord api, reflect changes here
This commit is contained in:
parent
0a53eb1f35
commit
6e2fd2b54d
|
@ -181,7 +181,7 @@ def permissions_for_roles(channel, *roles):
|
|||
# Apply channel specific role permission overwrites
|
||||
for target, overwrite in channel.overwrites.items():
|
||||
# Handle default role first, if present
|
||||
if overwrite.id == default.id:
|
||||
if overwrite == default:
|
||||
base.handle_overwrite(allow=overwrite.allow, deny=overwrite.deny)
|
||||
|
||||
if isinstance(target, discord.Role) and target.id in role_ids:
|
||||
|
|
|
@ -181,7 +181,7 @@ def permissions_for_roles(channel, *roles):
|
|||
# Apply channel specific role permission overwrites
|
||||
for target, overwrite in channel.overwrites.items():
|
||||
# Handle default role first, if present
|
||||
if overwrite.id == default.id:
|
||||
if overwrite == default:
|
||||
base.handle_overwrite(allow=overwrite.allow, deny=overwrite.deny)
|
||||
|
||||
if isinstance(target, discord.Role) and target.id in role_ids:
|
||||
|
|
Loading…
Reference in a new issue