Tick the permissions your bot needs to get the integer Discord expects and an invite link with it filled in. Paste an existing number or invite link to decode it. Every flag in Discord's current docs is here, including Pin Messages, Create Polls and Bypass Slowmode.
https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID&permissions=274878286912&scope=bot+applications.commandsDeploy the bot from GitHub as a Background Worker on EthioDeploy: no web port, never put to sleep, restarted if it crashes. Keep the bot token in an encrypted environment variable, not in the code.
Start from a preset, then add or remove what the bot actually calls. Fewer permissions means less damage if the token leaks.
Copy it from the Discord Developer Portal, under General Information. Leave slash commands on if the bot registers any.
Pick a server you manage and authorize. The bot joins with a role carrying exactly these permissions, which server admins can change later.
applications.commands scope in its invite to register slash commands. Use Application Commands is the permission members need to run them.Last updated
Each permission is one bit in a number. Add up 2 to the power of each permission's bit, or tick the boxes above and copy the result. For example, View Channels (1024) plus Send Messages (2048) is 3072.
Most chat bots need View Channels, Send Messages, Send Messages in Threads, Embed Links, Attach Files and Read Message History. Add moderation permissions only for moderation features, and avoid Administrator.
No. Administrator grants every permission and ignores channel overrides, so a leaked token gives full control of the server. Server owners are also less likely to accept an invite that asks for it.
It is the permissions query parameter in the discord.com/oauth2/authorize link: the sum of the bits the bot will get on its role when someone adds it. Paste a link into the decoder above to see the list.
On servers that require two-factor authentication for moderation, Discord only honors permissions such as Kick, Ban, Manage Roles and Manage Messages when the bot's owner has 2FA on their account. They are marked 2FA above.
Read next: Deploy a Telegram bot · Web services vs background workers
EthioDeploy builds and runs your app on every push, with a database and HTTPS. Free plan, no card.
Deploy free