Skip to content

Discord

Connect Archon to Discord so you can interact with your AI coding assistant from any Discord server or DM.

  • Archon server running (see Getting Started)
  • A Discord account
  • “Manage Server” permission on the Discord server you want to add the bot to
  1. Visit Discord Developer Portal
  2. Click “New Application” > Enter a name > Click “Create”
  3. Go to the “Bot” tab in the left sidebar
  4. Click “Add Bot” > Confirm
  1. Under the Bot tab, click “Reset Token”
  2. Copy the token (starts with a long alphanumeric string)
  3. Save it securely — you won’t be able to see it again
  1. Scroll down to “Privileged Gateway Intents”
  2. Enable “Message Content Intent” (required for the bot to read messages)
  3. Save changes
  1. Go to “OAuth2” > “URL Generator” in the left sidebar
  2. Under “Scopes”, select:
    • bot
  3. Under “Bot Permissions”, select:
    • Send Messages
    • Read Message History
    • Create Public Threads (optional, for thread support)
    • Send Messages in Threads (optional, for thread support)
  4. Copy the generated URL at the bottom
  5. Paste it in your browser and select your server
  6. Click “Authorize”

Note: You need “Manage Server” permission to add bots.

DISCORD_BOT_TOKEN=your_bot_token_here

To restrict bot access to specific users, enable Developer Mode in Discord:

  1. User Settings > Advanced > Enable “Developer Mode”
  2. Right-click on users > “Copy User ID”
  3. Add to environment:
DISCORD_ALLOWED_USER_IDS=123456789012345678,987654321098765432
DISCORD_STREAMING_MODE=batch # batch (default) | stream

For 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