Discord
Connect Archon to Discord so you can interact with your AI coding assistant from any Discord server or DM.
Prerequisites
Section titled “Prerequisites”- Archon server running (see Getting Started)
- A Discord account
- “Manage Server” permission on the Discord server you want to add the bot to
Create Discord Bot
Section titled “Create Discord Bot”- Visit Discord Developer Portal
- Click “New Application” > Enter a name > Click “Create”
- Go to the “Bot” tab in the left sidebar
- Click “Add Bot” > Confirm
Get Bot Token
Section titled “Get Bot Token”- Under the Bot tab, click “Reset Token”
- Copy the token (starts with a long alphanumeric string)
- Save it securely — you won’t be able to see it again
Enable Message Content Intent (Required)
Section titled “Enable Message Content Intent (Required)”- Scroll down to “Privileged Gateway Intents”
- Enable “Message Content Intent” (required for the bot to read messages)
- Save changes
Invite Bot to Your Server
Section titled “Invite 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
- Paste it in your browser and select your server
- Click “Authorize”
Note: You need “Manage Server” permission to add bots.
Set Environment Variable
Section titled “Set Environment Variable”DISCORD_BOT_TOKEN=your_bot_token_hereConfigure User Whitelist (Optional)
Section titled “Configure User Whitelist (Optional)”To restrict bot access to specific users, enable Developer Mode in Discord:
- User Settings > Advanced > Enable “Developer Mode”
- Right-click on users > “Copy User ID”
- Add to environment:
DISCORD_ALLOWED_USER_IDS=123456789012345678,987654321098765432Configure Streaming Mode (Optional)
Section titled “Configure Streaming Mode (Optional)”DISCORD_STREAMING_MODE=batch # batch (default) | streamFor streaming mode details, see Configuration.
The bot responds to:
- Direct Messages: Just send messages directly
- Server Channels: @mention the bot (e.g.,
@YourBotName help me with this code) - Threads: Bot maintains context in thread conversations