Discord Permissions Explained: Bitfields, Roles and Overrides
How Discord permissions work: the permission integer, role hierarchy, channel overrides, and how to calculate the number your bot invite link needs.
Every Discord permission, from sending messages to banning members, is one bit in a single number. That number is the "permissions integer" you see in bot invite links.
How the number works
Each permission has a fixed value, a power of two. Add up the permissions you want and you get the integer. For example, Send Messages and Embed Links together are two separate bits added into one number.
You almost never want to add these by hand. The free Discord Permissions Calculator lets you tick the permissions you need and gives you the integer.
Where permissions come from
Discord evaluates permissions in layers:
- Server owner and Administrator. These bypass everything else.
- Role permissions. A member gets the combined permissions of all their roles, plus
@everyone. - Channel overrides. A channel can allow or deny a permission for a role or a member, and these win over role permissions.
Role hierarchy
Roles are ordered. A role can only manage roles below it, and a bot can only kick, ban or assign roles for members and roles beneath its own highest role. Most "my bot can't do X" problems are a role sitting too low in the list.
Give a bot the minimum it needs
Asking for Administrator is easy and risky. If the bot is compromised or misconfigured, it can do anything. List what the bot actually does, tick only those permissions in the calculator, and use the integer in the invite link.
Check a server before you join
Before adding anything to a server, you can look at it first. Paste an invite into the Discord Invite Checker to see whether it is valid and what server it points to, without joining.
Skip the permission math
With ServaDiscord, you design roles and channels visually and the permissions are set for you.
