Skip to content

Commit

Permalink
update permissions for pod mergers
Browse files Browse the repository at this point in the history
  • Loading branch information
iamzoltan committed Jul 10, 2024
1 parent 9c97b93 commit 836e820
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions utils/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,19 +256,19 @@ async def callback(self, interaction: discord.Interaction):
if ta_role in eachMember.roles:
manage_perm = True
if old_mega != new_mega:
await old_ta.set_permissions(eachMember, view_messages=False, send_messages=False)
await new_ta.set_permissions(eachMember, view_messages=True, send_messages=True)
await old_ta.set_permissions(eachMember, view_channel=False, send_messages=False)
await new_ta.set_permissions(eachMember, view_channel=True, send_messages=True)
else:
manage_perm = False

await old_channel.set_permissions(eachMember, view_messages=False, send_messages=False,
await old_channel.set_permissions(eachMember, view_channel=False, send_messages=False,
manage_messages=False)
await new_channel.set_permissions(eachMember, view_messages=True, send_messages=True,
await new_channel.set_permissions(eachMember, view_channel=True, send_messages=True,
manage_messages=manage_perm)

if old_mega != new_mega:
await old_mega.set_permissions(eachMember, view_messages=False, send_messages=False)
await new_mega.set_permissions(eachMember, view_messages=True, send_messages=True)
await old_mega.set_permissions(eachMember, view_channel=False, send_messages=False)
await new_mega.set_permissions(eachMember, view_channel=True, send_messages=True)
# TODO: maybe remove this message? forum channels do not have a .send method
# await new_channel.send(embed=interact.send_embed('custom', 'Pod Merge Notice',
# f'Pod {origin_pod} has been merged into {target_pod}.'))
Expand Down

0 comments on commit 836e820

Please sign in to comment.