Skip to content

Discord

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

New identities are created as members. The operator can designate admins with archon user role <id> admin; only a run’s starter or an admin can act on it. See Who can act on a run.

  • Archon server running (archon serve; see Web UI)
  • 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.

By default the bot only activates in servers when @mentioned (DMs are exempt). On single-user or private servers you can opt out so the bot responds to any authorized message:

DISCORD_REQUIRE_MENTION=false # true (default) | false

Only the literal value false disables the mention requirement. Mentions that are present are still stripped from the message.

Select a registered project by submitting /setproject <name> in the conversation or thread where you want to work. To register a local directory first, submit /register-project [--folder] <name> <path>, then select it; registration alone does not bind the conversation. Projectless questions still work. Selection applies to that conversation, not every channel.

Once scoped, the assistant launches and manages runs through its native tools (Claude, Codex, Pi) or the existing CLI (Copilot/OpenCode). CLI launches are detached and headless, use CLI identity and return a run ID for inspection; they do not deliver progress or results to the originating chat. See Deprecated providers.

The bot responds to:

  • Direct Messages: Just send messages directly
  • Server Channels: @mention the bot (e.g., @YourBotName help me with this code) — or any authorized message when DISCORD_REQUIRE_MENTION=false
  • Threads: Bot maintains context in thread conversations