Set up your bot on Discord
Everything you do on Discord's side, in order. It takes about ten minutes the first time. Keep this page open next to the Discord Developer Portal.
Create an application
- Go to the Discord Developer Portal and sign in with the Discord account that owns your server.
- Click New Application in the top right.
- Type a name. It becomes your bot's name in the member list, and you can change it later.
- Tick the box to accept the Developer Terms of Service and Developer Policy, then click Create.
Want a profile picture? Upload it under App Icon on the General Information page.
Get the bot token
- In the left menu, open Bot.
- Under Token, click Reset Token and confirm with Yes, do it!. If your account has two-factor authentication, Discord asks for your code.
- Click Copy. Discord shows the token once. If you lose it, reset it again.
What a token looks like
MTI4NDk3NjQ1MjkxMzc0NjA5OA.GxR2k9.r4Nd0mLooK1ngS3cr3tV4lu3_xxxxxxxxxx
Three parts separated by dots, usually around 70 characters. The Application ID, Public Key and Client Secret are different values and will not work as a token.
The token is the bot's password. Never post it in a chat or a screenshot. If it leaks, click Reset Token: the old one stops working immediately, so paste the new one in your bot's settings here too.
Turn on the intents your bot uses
Some data is off by default, and the bot only receives it if you switch on the matching privileged gateway intent. Stay on the Bot page and scroll to Privileged Gateway Intents. Your bot plan here lists which ones your bot uses.
Privileged Gateway Intents
Some Gateway Intents require approval if your bot is verified.
Presence Intent
Lets the bot see members' online status and what they are playing or streaming.
Server Members Intent
Lets the bot know when members join or leave, and read the member list.
Message Content Intent
Lets the bot read the text of messages.
- Presence Intent
- Turn it on for "now playing" roles, live-stream alerts based on Discord activity, or online member counters. Most bots never need it.
- Server Members Intent
- Turn it on for welcome and goodbye messages, roles given on join, verification and member counters.
- Message Content Intent
- Turn it on for prefix commands like !help, word filters and auto-moderation, keyword replies and AI chat that answers messages. Slash commands and buttons work without it.
Click Save Changes at the bottom of the page. Switching on an intent your bot does not use does no harm. Once a bot is in 100 or more servers, Discord requires verification before it can use privileged intents.
Invite the bot to your server
The quickest way is the invite link on your bot's page here: it already has the right permissions. To make one yourself:
- Open OAuth2 in the left menu, then URL Generator.
- Under Scopes, tick
botandapplications.commands. The second one is what makes slash commands appear. - Under Bot Permissions, tick only what the bot needs. Avoid Administrator.
- Copy the Generated URL at the bottom and open it in your browser.
- Pick your server, click Continue, then Authorize. You need the Manage Server permission on that server.
Bots can only manage roles below their own. In Server Settings > Roles, drag the bot's role above any role it should hand out or moderate.
Copy channel and role IDs
If your bot posts in a specific channel or gives a specific role, it needs their IDs. Discord hides the copy option until you turn on Developer Mode.
- Open User Settings (the gear next to your name), then Advanced, and turn on Developer Mode. On mobile it is under App Settings > Advanced.
- Right-click a channel and choose Copy Channel ID. On mobile, long-press it.
- For a role, open Server Settings > Roles, open the role's menu and choose Copy Role ID.
- Right-click a member for Copy User ID, or the server icon for Copy Server ID.
An ID is a long number, like 1284976452913746098. Channel names change; IDs don't, which is why bots use them.
Connect it here
- Open your bot here and go to the publish step.
- Paste the token. We check it with Discord and show the bot's name and picture so you can confirm it is the right one.
- Fill in the channel and role IDs your bot asks for, then deploy.
- Watch the logs: when the bot says it is ready, it is online in your server.
Troubleshooting
Find the message from your bot's logs. Each one says what happened and how to fix it.
The bot won't log in: Discord rejected the tokenTokenInvalid
Discord rejected the token. Usually the token was reset after you pasted it, only part of it was copied, or the Client Secret, Application ID or Public Key was pasted instead.
- Open your application in the Developer Portal and go to Bot.
- Click Reset Token, confirm, and copy the new token.
- Paste it in your bot's settings here and restart the bot.
The bot won't connect: an intent is switched offUsed disallowed intents
The bot asks Discord for a privileged intent that is switched off on the Bot page. Discord closes the connection, so the bot never comes online.
- Go to Bot in the Developer Portal and scroll to Privileged Gateway Intents.
- Turn on the intents listed in your bot plan (usually Server Members, Message Content or both).
- Click Save Changes, then restart the bot.
The bot shows as offline in Discord
Either the bot is not running, or it is running but cannot log in. A free bot also pauses after its 7 free days.
- Check the bot's status on your dashboard. If it stopped or keeps restarting, open Logs to see why.
- If the logs mention a token or intents, use the fixes above.
- If it says paused, choose a plan to bring it back online with the same code.
The bot is online but its slash commands don't show up
The bot was invited without the applications.commands scope, or Discord has not refreshed your command list yet.
- Open the invite link again from your dashboard and authorize it. You do not need to kick the bot first.
- Restart Discord (Ctrl+R on desktop) and type / in a channel the bot can see.
The bot is online but can't do somethingMissing Permissions / Missing Access
The bot's role lacks a permission, a channel override blocks it, or it is trying to manage a role that sits above its own.
- In Server Settings, open Roles and drag the bot's role above the roles it gives out or moderates.
- Check the channel's permissions: the bot needs View Channel and Send Messages there.
Still stuck? Ask in our Discord server and paste the last lines of your bot's log (never the token).

Don't have a bot yet?
Describe what it should do. The AI writes it, then this guide gets it online.