6 custom skills (assign-task, dispatch-webhook, daily-briefing, task-capture, qmd-brain, tts-voice) with technical documentation. Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
1.8 KiB
1.8 KiB
Discord (Bot API)
Overview
OpenClaw supports Discord integration for direct messages and guild text channels. The system requires a bot token, message content intent, and proper configuration to function.
Quick Setup
To enable Discord:
- Create a Discord bot application and obtain the token
- Enable "Message Content Intent" and "Server Members Intent" in Discord Developer Portal
- Configure the token via environment variable (
DISCORD_BOT_TOKEN) or config file - Invite the bot to your server with appropriate permissions
- Start the gateway
Minimal configuration:
{
"channels": {
"discord": {
"enabled": true,
"token": "YOUR_BOT_TOKEN"
}
}
}
Key Features
- DM handling: Uses pairing-based security by default; unknown senders receive time-limited pairing codes
- Guild channels: Isolated sessions per channel with optional mention requirements
- Group DMs: Disabled by default; can be enabled via configuration
- Message routing: Replies always return to the originating channel
- File uploads: Supported up to 8 MB (configurable)
- Reactions: Available via the
discordtool when enabled
Configuration Options
The system supports granular control through:
- Per-guild rules and channel-specific settings
- User allowlists at multiple levels (DM, guild, channel)
- Mention requirements for reducing noise in shared channels
- Tool action gates (reactions, threads, moderation, etc.)
- Reply threading via special tags in model output
Safety Considerations
- Treat bot tokens as sensitive credentials; use environment variables in production
- Grant only necessary permissions (View Channels, Send Messages, Read History)
- Use allowlists to restrict access in shared spaces
- Monitor rate limiting with retry policies