<-- Back to Docs // GUIDE

Discord Bot Setup

Create and configure a Discord bot application so CircuitBot can connect to your server. This takes about 5 minutes.

[ 5 min read ]

01 Open the Developer Portal

Go to the Discord Developer Portal:

>_ discord.com/developers/applications

Log in with your Discord account if you are not already signed in.


02 Create a New Application

  1. Click the "New Application" button in the top-right corner.
  2. Give it a name -- for example, "CircuitBot" or your team name. This name will appear in your server's member list.
  3. Accept the Developer Terms of Service and click "Create".

You will land on the application's General Information page. You can optionally add a description and app icon here.


03 Bot Settings

  1. In the left sidebar, click "Bot".
  2. Click "Add Bot" and confirm.
  3. Under the bot's username, click "Reset Token" to generate a new token, then click "Copy".
WARNING
Keep this token secret. Your bot token is like a password -- anyone who has it can control your bot. Never commit it to version control, paste it in public channels, or share it in screenshots. If it is ever exposed, return here and click "Reset Token" immediately.

You will paste this token into the CircuitBot setup wizard (Step 2 of the Setup Guide).

bot_token.env
# Your token will look something like this:
MTIzNDU2Nzg5MDEy.XXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Paste this into the CircuitBot setup wizard

04 Privileged Gateway Intents

Still on the Bot page, scroll down to the "Privileged Gateway Intents" section. Enable the following:

Message Content Intent

Required

CircuitBot needs to read the content of messages where it is @mentioned. Without this intent, the bot receives empty message bodies and cannot process tasks.

Server Members Intent

Optional

Allows CircuitBot to resolve user display names in logs and the dashboard. The bot works without this, but you will see user IDs instead of names.

Click "Save Changes" at the bottom of the page.


05 Generate the Invite URL

  1. In the left sidebar, click "OAuth2".
  2. Under "OAuth2 URL Generator", select the scope: bot.
  3. In the "Bot Permissions" section that appears, check the following permissions:
Send Messages
Read Message History
Read Messages / View Channels
Embed Links
Attach Files
  1. Scroll down and copy the "Generated URL".
oauth2_url.txt
# Your URL will look like this:
https://discord.com/api/oauth2/authorize?client_id=YOUR_APP_ID&permissions=117760&scope=bot

06 Invite the Bot to Your Server

  1. Open the generated URL in your web browser.
  2. Discord shows an authorization page. Select the server you want to add the bot to from the dropdown.
  3. Review the requested permissions and click "Authorize".
  4. Complete the CAPTCHA if prompted.
INFO
Note: You need the "Manage Server" permission on the target server to add a bot. If you do not see your server in the dropdown, ask the server owner to grant you this permission or to add the bot themselves using the URL.

07 Verify the Bot

After authorization, the bot appears in your server's member list. It will show as offline -- this is expected. The bot only comes online when the CircuitBot desktop app is running and connected.

STATUS CHECK
Bot visible in the server member list
Bot token copied and ready for the setup wizard
Message Content Intent enabled
Correct permissions granted

You are all set. Head to the Setup Guide to connect this bot token to CircuitBot and start dispatching tasks.