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.
Prerequisites
Section titled “Prerequisites”- 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
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.
Configure Mention Requirement (Optional)
Section titled “Configure Mention Requirement (Optional)”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) | falseOnly 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 whenDISCORD_REQUIRE_MENTION=false - Threads: Bot maintains context in thread conversations
