Discord Setup
This guide helps you bind your agent to Discord in Spira AI.
To complete the setup, prepare these values from Discord:
Bot TokenServer IDUser ID
If you have not created a Discord bot before, follow the steps below in order.
Before You Start
- You have a Discord account that can create applications in the Discord Developer Portal
- You can add a bot to the Discord server where you want the agent to work
- You already created the AI Influencer you want to set up in Spira AI
What You Need
Bot Token
Example: MTEx...your-bot-tokenServer ID
Example: 123456789012345678User ID
Example: 987654321098765432Setup Steps
1. Create a Discord Application and Bot
Open the Discord Developer Portal:
https://discord.com/developers/applications
Click New Application and create a new app for your agent.
Then click Bot in the sidebar and can set the bot username to whatever you want to call your agent.
2. Enable Privileged Intents
Stay on the Bot page and scroll down to Privileged Gateway Intents.
Enable:
Message Content Intentand treat it as requiredServer Members Intentand treat it as recommended, especially if you need role allowlists or user matchingPresence Intentonly if your workflow depends on presence updates
3. Copy Your Bot Token
Scroll back up on the Bot page and click Reset Token.
Despite the name, this can also be the first time you generate the token. Copy the token and save it somewhere safe.
This value is your Bot Token, and you will need it when you bind Discord in Spira AI.
4. Generate an Invite URL and Add the Bot to Your Server
Click OAuth2 in the sidebar. This is where you generate the invite URL used to add the bot to your Discord server.
In OAuth2 URL Generator, enable:
botapplications.commands
Then in Bot Permissions, enable:
View ChannelsSend MessagesRead Message HistoryEmbed LinksAttach FilesAdd Reactionsif your workflow needs reactions
Copy the generated URL at the bottom, open it in your browser, select your server, and continue the install flow.
After that, you should see the bot in your Discord server.
5. Enable Developer Mode and Collect Your IDs
Back in the Discord app, enable Developer Mode so you can copy internal IDs.
Open:
User Settings -> Advanced -> turn on Developer Mode
Then collect:
- Right-click your server icon in the sidebar and copy the
Server ID - Right-click your own avatar and copy the
User ID
Save both values together with your Bot Token.
Bind in Spira AI
After the Discord side is ready, open the AI Influencer in Spira AI and go to the Agent page.
Then:
- Select
Discordas the channel type. - Paste the
Bot Token. - Enter the
Server IDandUser IDif your flow requires them. - Save the configuration.
Recommended Checks Before Save
- Confirm the copied value is the bot token, not the application ID or client secret
- Confirm the bot was added to the correct Discord server
- Confirm the selected bot permissions match the channels and features you want to use
- Confirm
Message Content Intentis enabled - Confirm your
Server IDandUser IDwere copied after enabling Developer Mode
Common Pitfalls
- Copying the application ID or client secret instead of the bot token
- Resetting the token and then saving an older token value
- Forgetting to enable
Message Content Intent - Granting too few bot permissions in the OAuth invite setup
- Adding the bot to the wrong Discord server
- Forgetting to turn on Discord direct messages before pairing
Troubleshooting
The Bot Connects But Does Nothing
Re-check these Discord-side items:
- The bot is in the correct server
- The bot can access the target channel
Message Content Intentis enabled- The OAuth invite permissions were granted correctly
A valid token alone is not enough if the bot cannot read or post where it needs to work.
Save Fails
Copy the token again from the Discord Developer Portal and make sure there are no extra spaces before or after the value.
If you recently clicked Reset Token, only the newest token will work.
Pairing or DM Flow Does Not Work
Check whether Direct Messages is enabled in the server privacy settings.
If Discord blocks DMs from server members, the bot may be installed correctly but still be unable to complete the expected DM flow.