Add native Discord admin check to channel link #222

Closed
opened 2026-01-29 20:30:43 -05:00 by sirdog3355 · 1 comment
sirdog3355 commented 2026-01-29 20:30:43 -05:00 (Migrated from github.com)

Right now, at listeners/channel-link.py, I account for someone having a role that grants read permissions or having gotten read permissions via overwrite. I do not account for a user having the Administrator permission. This means that members with that permission, unless they have a role which grants read access, are going to needlessly have read permissions given and revoked.

Desired functionality is to build a check to stop doing anything if the user has the Administrator permission.

Right now, at `listeners/channel-link.py`, I account for someone having a role that grants read permissions or having gotten read permissions via overwrite. I do *not* account for a user having the `Administrator` permission. This means that members with that permission, unless they have a role which grants read access, are going to needlessly have read permissions given and revoked. Desired functionality is to build a check to stop doing anything if the user has the `Administrator` permission.
sirdog3355 commented 2026-01-30 17:13:15 -05:00 (Migrated from github.com)

I... actually do already check for this. God, I'm losing it.

if member.guild_permissions.administrator:
                logger.debug(f"{member.name} ({member.id}) joined VC {after.channel.name} linked to #{txt_channel.name}. {member.name} is an administrator. Nothing to do.")
                return

Closing.

I... actually _do_ already check for this. God, I'm losing it. ``` if member.guild_permissions.administrator: logger.debug(f"{member.name} ({member.id}) joined VC {after.channel.name} linked to #{txt_channel.name}. {member.name} is an administrator. Nothing to do.") return ``` Closing.
Sign in to join this conversation.
No description provided.