lutfenbot Help

How permissions are resolved

Permissions are resolved by first calculating explicit permissions and then applying implicit permissions.

In short, these situations are considered: (Most to least priority)

  1. Permission and channel type mismatches — e.g. Connect and a forum channel

  2. Channel visibility — e.g. Create Invite and a channel hidden to the member

  3. Message sendability — e.g. Attach Files and a channel where the member can't send messages

  4. Server owner

  5. Administrator permission

  6. Time-outs

  7. Member channel overwrites

  8. Allowing role channel overwrites

  9. Denying role channel overwrites

  10. @everyone channel overwrites

  11. Global permissions of the roles

  12. Global permissions of @everyone

How to calculate explicit permissions

Calculate permissions based on global permissions and channel permission overwrites.

  1. Inherit permissions from @everyone

  2. Set all permissions given to the member's roles to Yes.

  3. Apply overwrites for @everyone by setting allowed permissions to Yes, denied permissions to No, and not touching unset permissions

  4. Set permissions that have a denying role overwrite that the member has to No

  5. Set permissions that have an allowing role overwrite that the member has to Yes

  6. Apply member overwrites by setting allowed permissions to Yes, denied permissions to No, and not touching unset permissions

The resulting set of permissions are partially resolved and must implicit permissions must be applied for them to be fully resolved.

How to apply implicit permissions

Update explicit permissions based on channel type and whether the status of the member.

  1. If the member is timed out, set all permissions except Read Messages and Read Message History to No

  2. If the member has the Administrator permission allowed by any of their roles, set all permissions to Yes

  3. If the member is the server owner, set all permissions to Yes

  4. If the channel is a thread, and if Send Messages in Threads is set to No; otherwise, if Send Messages is set to No; set the following to No:

    • Embed Links

    • Attach Files

    • Mention @everyone, @here and All Roles

    • Send Text-to-speech Messages

  5. If Read Messages is set to No, set the following to No:

    • Add Reactions

    • Attach Files

    • Connect

    • Create Invite

    • Create Private Threads

    • Create Public Threads

    • Deafen Members

    • Embed Links

    • Use External Emojis

    • Use External Stickers

    • Manage Channels

    • Manage Messages

    • Manage Roles

    • Manage Threads

    • Manage Webhooks

    • Mention @everyone, @here and All Roles

    • Move Members

    • Mute Members

    • Priority Speaker

    • Read Message History

    • Read Messages

    • Request to Speak

    • Send Messages

    • Send Messages in Threads

    • Send Text-to-speech Messages

    • Speak

    • Video

    • Use Application Comands

    • Use Soundboard

    • Use Voice Activity

  6. If the channel is a text channel or a forum channel, set the following to No:

    • Connect

    • Deafen Members

    • Move Members

    • Mute Members

    • Priority Speaker

    • Speak

    • Video

    • Use Activities

    • Use External Sounds

    • Use Soundboard

    • Use Voice Activity

  7. If the channel is a voice channel and Connect is set to No, set the following to No:

    • Connect

    • Deafen Members

    • Manage Channels

    • Manage Roles

    • Move Members

    • Mute Members

    • Priority Speaker

    • Speak

    • Video

    • Use Activities

    • Use External Sounds

    • Use Soundboard

    • Use Voice Activity

The resulting set of permissions is the resolved permissions.

Last modified: 06 November 2024