Discord
Connecting Discord lets people talk to an agent in a server channel or a direct message, and lets agents post messages, reactions, and threads back.
Discord is the one channel that does not use a webhook: the platform opens a persistent connection to Discord itself. That changes one thing in the setup — the connection starts when the platform starts.
Read Channels and bots first for the concepts shared with the other platforms.
Before you start
- You need permission to create an application in the Discord developer portal, and to invite a bot to the target server.
- You need administrator rights in XTM One.
- You need to be able to restart the platform after saving the credentials.
Step 1: Create the Discord application
- Go to discord.com/developers/applications and create a new application.
- Open
Bot, clickReset Token, and copy the token. - Under
Privileged Gateway Intents, enableMessage Content Intent. Without it, Discord delivers empty message content and the agent has nothing to answer. - Optionally copy the application public key from
General Informationif you plan to use slash commands.
Step 2: Invite the bot to your server
- Open
OAuth2>URL Generator. - Select the
botscope. - Select the permissions
Send Messages,Read Message History, andAdd Reactions. - Open the generated URL and invite the bot to the server.
Step 3: Connect the bot in XTM One
- Go to
Settings>Channels & Botsand clickConfigureon the Discord card. - Paste the bot token into
Bot Token / Access Token. - Optionally paste the application public key into
Application public key. It is only needed for the interactions endpoint used by slash commands, and it enables signature verification on that endpoint. - Click
Save Channel.
Restart the platform after saving
The Discord connection is opened at platform startup. A bot saved on a running platform stays offline until the next restart.
Step 4: Enable Discord on an agent
Open the agent, go to Configuration > Channels & Bots, and enable Discord:
- Turn on
Receiveso the agent answers incoming messages. - Turn on
Publishif the agent should post on its own. - Decide whether direct messages are allowed with
Allow private, and whether people without an account may use the agent withAllow anonymous.
Whitelist entries are Discord channel IDs. To copy one, enable developer mode in Discord, then right-click a channel and choose Copy Channel ID.
What to expect on Discord
- Discord does not expose an email address, so senders cannot be matched to an XTM One account automatically. Turn on
Allow anonymous usersif unknown senders should be served — the agent still receives the username as context. - Mentions are detected, so
Only when mentionedworks in server channels. Thread continuation does not: Discord has no thread identifier narrow enough to track, so a mention is needed for each new question when mention-only is on./stopis unavailable for the same reason, while/resetworks. - Answers longer than the Discord limit are split into several messages automatically.
What the agent can do in Discord
When Publish is on, the agent can send a message, read recent messages in a channel, list the channels it can see, create a thread, add a reaction, pin or unpin a message, and delete one of its own messages.
Best practices
- Restrict the receive whitelist to the channels where the bot is genuinely expected, since a server invitation exposes many channels at once.
- Use
Only when mentionedin community servers so the bot does not answer general chatter. - Use a dedicated agent with a narrow tool set when the server is public.
Troubleshooting
The bot appears offline. The platform has not been restarted since the credentials were saved, or the token is wrong. Restart and check the platform logs for the Discord connection.
Messages arrive empty or are ignored. Message Content Intent is not enabled in the developer portal.
The bot answers in direct messages but not in channels. Check the channel permissions on the Discord side, the receive whitelist, and whether a mention is required.
Slash commands do nothing. The interactions endpoint URL must be configured in the developer portal, and the application public key must be stored in XTM One — Discord probes the endpoint with an invalid signature and expects it to be refused.
Next step
Connect another platform, such as Google Chat, or review how agents use channels in Agents.