Docs Site

Spira Docs

docs/Agent Channels

Discord

Bind your agent to Discord with a bot token and confirm server-side permissions before saving.

Discord Setup

This guide helps you bind your agent to Discord in Spira AI.

To complete the setup, prepare these values from Discord:

  • Bot Token
  • Server ID
  • User 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-token
Server ID
Example: 123456789012345678
User ID
Example: 987654321098765432

Setup 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 Intent and treat it as required
  • Server Members Intent and treat it as recommended, especially if you need role allowlists or user matching
  • Presence Intent only 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:

  • bot
  • applications.commands

Then in Bot Permissions, enable:

  • View Channels
  • Send Messages
  • Read Message History
  • Embed Links
  • Attach Files
  • Add Reactions if 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:

  1. Select Discord as the channel type.
  2. Paste the Bot Token.
  3. Enter the Server ID and User ID if your flow requires them.
  4. Save the configuration.
  • 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 Intent is enabled
  • Confirm your Server ID and User ID were 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 Intent is 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.