The Discord adapter is a community-contributed adapter that connects Archon to Discord servers and DMs using the discord.js library over a persistent WebSocket (Gateway) connection. You interact with the bot by @mentioning it in server channels or by sending it direct messages. This page covers creating a Discord application, enabling required intents, inviting the bot to your server, and configuring environment variables.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coleam00/Archon/llms.txt
Use this file to discover all available pages before exploring further.
The Discord adapter is maintained by the community. If you run into issues specific to Discord integration, check the GitHub repository for open issues or open a new one.
Prerequisites
- Archon server running — see Quickstart
- A Discord account
- Manage Server permission on the server you want to add the bot to
How conversation IDs work
Each Discord channel maps to a single Archon conversation. The conversation ID is the channel’s numeric ID (e.g.1234567890123456789). All messages in the same channel share one conversation and full context is preserved across messages.
For direct messages, the DM channel between you and the bot is the conversation.
Setup
Create a Discord application
- Visit discord.com/developers/applications
- Click New Application, enter a name, and click Create
- Go to the Bot tab in the left sidebar
- Click Add Bot and confirm
Get the bot token
- On the Bot tab, click Reset Token
- Copy the token — it starts with a long alphanumeric string
- Save it securely: you cannot view this token again after leaving the page
Enable Message Content Intent
- On the Bot tab, scroll to Privileged Gateway Intents
- Enable Message Content Intent
- Click Save Changes
Generate an invite URL and add the bot to your server
- Go to OAuth2 → URL Generator in the left sidebar
- Under Scopes, select
bot - Under Bot Permissions, select:
- Send Messages
- Read Message History
- Create Public Threads (optional, for thread support)
- Send Messages in Threads (optional, for thread support)
- Copy the generated URL at the bottom of the page
- Paste it in your browser, select your server, and click Authorize
Restricting access (optional)
To limit which Discord users can interact with the bot, enable Developer Mode and collect user IDs:- Open Discord Settings → Advanced and toggle Developer Mode ON
- Right-click a user in any channel and choose Copy User ID
.env:
Streaming mode (optional)
batch mode Archon sends one complete message per response, which avoids Discord’s rate limits. In stream mode it updates the message progressively. See Configuration for details.
Usage
@Mention in a server channel
After inviting the bot, @mention it to send a message:Direct messages
Send a DM directly to the bot — no @mention needed:Threads
The bot maintains context in thread conversations. All messages in the same thread are part of the same conversation.Troubleshooting
Bot appears offline after starting the server
Bot appears offline after starting the server
- Verify
DISCORD_BOT_TOKENis set and correct in.env - Check the server logs for errors from the Discord adapter
- Confirm Message Content Intent is enabled in the Developer Portal
"Used disallowed intents" error
"Used disallowed intents" error
Enable the Message Content Intent under Bot → Privileged Gateway Intents in the Discord Developer Portal, then restart the Archon server.
Bot does not respond to messages
Bot does not respond to messages
- Make sure you @mention the bot in server channels (DMs do not require a mention)
- Check that the bot has Send Messages and Read Message History permissions in the channel
- If
DISCORD_ALLOWED_USER_IDSis set, verify your user ID is included
Bot was added to server but shows no permissions
Bot was added to server but shows no permissions
Regenerate the invite URL from OAuth2 → URL Generator in the Developer Portal and re-invite the bot. Make sure to select the required bot permissions before copying the URL.
Further reading
Configuration reference
Full list of environment variables and config options.
Telegram adapter
Connect Archon via Telegram Bot API with long-polling.
Slack adapter
Connect Archon to Slack via Socket Mode.
Authoring workflows
Build multi-step automated workflows triggered from any adapter.