Discord
Connect OpenCrabs to Discord for server and DM interactions.
Setup
Step 1: Create a Discord Bot
- Go to discord.com/developers/applications
- Create a new application
- Go to Bot section, create a bot
- Enable MESSAGE CONTENT Intent (required — under Privileged Gateway Intents)
- Copy the bot token
- Under OAuth2 → URL Generator, select
botscope withSend MessagesandRead Message Historypermissions - Use the generated URL to invite the bot to your server
Step 2: Configure via the Onboarding Wizard
Run /onboard:channels (or /onboard and navigate to the Channels step):
- Use
↑/↓to focus Discord - Press
Spaceto toggle it on - Press
Enterto open the Discord setup screen - Fill in the fields:
- Bot Token — paste the token from the Developer Portal
- Channel ID — the Discord channel to send the welcome message to (right-click a channel with Developer Mode on → Copy Channel ID)
- Allowed Users — comma-separated Discord user IDs (leave empty to allow everyone)
- Respond To —
all,dm_only, ormention
- Press
Enteron Test Connection to verify - Press
Enterto save and return to the channel list
Enable Developer Mode in Discord: Settings → Advanced → Developer Mode
Manual Configuration (advanced)
# keys.toml
[channels.discord]
token = "your-bot-token"
# config.toml
[channels.discord]
enabled = true
allowed_channels = ["123456789"]
allowed_users = []
respond_to = "all"
Configuration
All Discord options live under [channels.discord] in ~/.opencrabs/config.toml:
[channels.discord]
enabled = true
token = "your-discord-bot-token" # or store in keys.toml
allowed_users = ["123456789012345678"] # Discord user IDs
allowed_channels = ["123456789012345678"]
respond_to = "mention" # "all", "dm_only", "mention" (default)
session_idle_hours = 24.0 # idle timeout for non-owner sessions
| Field | Default | Description |
|---|---|---|
enabled | false | Enable the Discord bot channel |
token | None | Discord bot token from the Developer Portal |
allowed_users | [] (accept all) | Discord user IDs. Accepts int or string arrays |
allowed_channels | [] (all channels) | Restrict bot to specific channel IDs |
respond_to | "mention" | When to respond: "all", "dm_only", "mention" |
session_idle_hours | None (no timeout) | Idle timeout for non-owner sessions. Owner sessions never expire |
Features
- Server channels and DMs — Works in text channels and direct messages
- Interactive components — Select menus, modal forms, button interactions with component TTL and role access
- Media gallery — Batch generated files into one multi-attachment message
- Grouped tool calls — Consecutive tool calls collapse into one expandable block with Expand/Collapse toggle
- Reactions — Agent can add emoji reactions to messages. Emoji reactions from users trigger agent turns (parity with Slack/Telegram)
- Forum threads — Support for Discord forum channels
- Image support — Send and receive images
- Embed suppression — Agent wraps multiple links in
<>to suppress embeds - Slash commands — All built-in and custom commands work
Interactive Components (v0.3.63)
Discord buttons, select menus, and modal forms power the provider picker, model picker, and session switcher. Components support:
- Component TTL — Components expire after a configurable timeout
- Role access — Restrict component interactions to specific Discord roles
- Forum threads — Agent can create and manage forum threads
Media Gallery (v0.3.63)
When the agent generates multiple files (PDFs, spreadsheets, images), Discord batches them into one multi-attachment message instead of sending separate messages for each file.
Grouped Tool Calls (v0.3.63)
Consecutive tool calls collapse into a single expandable block in Discord. Users can toggle between expanded and collapsed views. This keeps the channel clean during multi-step operations.
Reactions (v0.3.63)
The agent can add emoji reactions to messages. When a user reacts with an emoji, it triggers an agent turn (parity with Slack and Telegram). This enables quick, lightweight interactions without typing full messages.
Formatting Notes
- No markdown tables in Discord — use bullet lists instead
- Wrap multiple links in
<url>to suppress embeds