Discord Permissions Calculator
Tick what your bot needs and get the permissions integer, decode any number or invite link back into permissions, and build the bot invite link - with a preview of what the server owner will be asked to approve.
Pick permissions
Permissions integer
2748782869128 permissions · hex 0x400005cc40
Bot invite link
Developer Portal > your app > General Information.
Enter a client ID to build the linkHow the permissions integer works
Discord stores a bot's or role's permissions as one number. Each permission owns a bit - Kick Members is bit 1, Send Messages bit 11, Pin Messages bit 51 - and the integer is those bits combined. Send Messages plus View Channel is 1 << 11 plus 1 << 10, which is 3072. Because the highest bits now pass 2 to the power of 53, the API sends permissions as strings and any code that handles them should use a 64-bit or big integer type, as this calculator does.
The number in an invite link only decides the role Discord creates for the bot when it joins. It is a ceiling, not a guarantee: channel overwrites can still deny any permission in a given channel, and the bot can never act on a member whose highest role sits above its own.
Asking for the right permissions
- Start from the job. A chat or support bot needs to view channels, read history, send messages and embed links. That is the Chat bot preset, and it is enough for most bots.
- Moderation is a deliberate choice. Kick, ban, timeout and Manage Messages are marked 2FA because servers that require two-factor moderation reject them when the bot owner has no 2FA.
- Avoid Administrator. It skips every overwrite and turns a leaked token into a full takeover. Server owners notice.
- Review before you approve. Paste any invite into the decoder to see exactly what a third-party bot wants.
When a permission is missing at runtime Discord answers with error 50013. The Discord error reference explains it alongside 50001 Missing Access, and the limits page covers the rate limits that bite next.
The invite link, part by part
A bot invite is an OAuth2 URL on discord.com/oauth2/authorize. client_id names your application; scope lists what is being granted - bot adds the bot user and applications.commands registers its slash commands; permissions is the integer above; integration_type chooses a server or a user install; guild_id with disable_guild_select pins the invite to one server. Scopes that read user data, such as identify or email, switch the flow to an authorisation code and need your registered redirect URI - see OAuth for how that exchange works. Format the messages your bot sends with the embed builder, or skip the code entirely with a hosted Discord chatbot.
Frequently asked questions
What is a Discord permissions integer?
It is every permission a bot or role has, packed into one number: each permission is a bit, and the integer is the sum of the bits that are on. Discord sends it as a string because it no longer fits in a JavaScript number. You put it in the permissions parameter of a bot invite link, or read it from a role object in the API.
How do I make a Discord bot invite link?
You need the application's client ID from the Developer Portal, the bot and applications.commands scopes, and the permissions integer for what the bot needs. Put them into https://discord.com/oauth2/authorize as query parameters, which is exactly what this tool assembles. Anyone with Manage Server on a server can then open the link and add the bot there.
Should my bot ask for Administrator?
Almost never. Administrator grants every permission and ignores channel overwrites, so a leaked token or a bug can do anything in every server that added the bot. Many server owners refuse such invites on sight. Ask only for what your features use - this calculator's presets are a sensible starting point - and add more later when a feature needs it.
Why does my bot still get Missing Permissions (50013)?
The invite only sets the bot's role when it joins. Channel overwrites can still deny a permission in one channel, the bot cannot act on members whose top role is above its own, and moderation actions marked with 2FA fail when the server requires two-factor authentication and the owner account lacks it. Check the channel overwrites and role order first.
What does integration_type do in the invite link?
It picks the install context. 0 installs the app to a server, which is what a bot with the bot scope needs. 1 installs it to the user's own account, so its commands follow them across servers and DMs without joining any server. Your app must have that context enabled in the Developer Portal for the link to work.
Can I decode the permissions of an existing invite link?
Yes. Paste the number from the permissions parameter, or the whole link, into the decode box and every permission it contains is ticked and listed. It is a quick way to review what a third-party bot is asking for before you approve it in your server.
Related
Want the bot without writing one?
Build a Discord chatbot that answers your community in plain language, with no code and no hosting. Free plan, no card.