Why Discord?
- Community Focused: Perfect for team collaboration and communities
- Rich Permissions: Fine-grained control over bot capabilities
- Group Support: Configurable mention-only or always-respond modes
- No Webhooks: Uses WebSocket Gateway (no server setup needed)
Prerequisites
- A Discord account
- Server admin permissions (to invite the bot)
- PicoClaw installed with LLM provider configured
- ~10 minutes for setup
Setup Instructions
Create a Discord Application
- Go to Discord Developer Portal
- Click New Application
- Give it a name (e.g., “PicoClaw Bot”)
- Click Create
Create a Bot User
- In your application, navigate to Bot in the left sidebar
- Click Add Bot
- Confirm by clicking Yes, do it!
- Under the TOKEN section, click Reset Token and copy it
Enable Privileged Intents
Still in the Bot settings page:
- Scroll down to Privileged Gateway Intents
- Enable MESSAGE CONTENT INTENT (required to read messages)
- (Optional) Enable SERVER MEMBERS INTENT if using member-based allow lists
- Click Save Changes
MESSAGE CONTENT INTENT is mandatory for the bot to see message content. Without it, the bot will connect but won’t receive messages.
Get Your User ID
To restrict bot access:
- Open Discord Settings → Advanced
- Enable Developer Mode
- Right-click your avatar or username
- Select Copy User ID
- Save this ID for the configuration
Configure PicoClaw
Edit Replace:
~/.picoclaw/config.json:token: Your bot token from the Developer Portalallow_from: Your Discord user ID (or empty array[]for public access)
Invite the Bot to Your Server
- Go back to your application in the Developer Portal
- Navigate to OAuth2 → URL Generator
- Under SCOPES, select:
bot
- Under BOT PERMISSIONS, select:
Send MessagesRead Message History- (Optional)
Attach Filesif you want the bot to send files - (Optional)
Add Reactionsfor reaction features
- Copy the generated URL at the bottom
- Open the URL in your browser
- Select your server and click Authorize
You need Manage Server permission on the Discord server to invite bots.
Configuration Options
Basic Configuration
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Enable Discord channel |
token | string | Yes | Bot token from Discord Developer Portal |
allow_from | array | No | List of allowed Discord user IDs (empty = allow all) |
group_trigger | object | No | Configure group chat trigger behavior |
Group Trigger Configuration
By default, the bot responds to all messages in channels. Usegroup_trigger to change this behavior:
Mention-Only Mode
Respond only when the bot is @mentioned:@YourBotName message.
Prefix-Based Triggers
Respond to messages starting with specific prefixes:!bot Hello there!ai What's the weather?
Hello there(no prefix)
Combined Configuration
Use both mention and prefix triggers:@YourBotName hello(mention)!bot hello(prefix)
Access Control
Allow specific users:Features
Text Messages
The bot processes text messages and maintains conversation context per user and channel.Direct Messages
Users can DM the bot directly for private conversations (ifallow_from permits).
Multi-Server Support
One bot instance can serve multiple Discord servers simultaneously. Each server/channel maintains independent conversation context.Channel Permissions
The bot respects Discord channel permissions. It will only respond in channels where it can:- Read messages
- Send messages
- Read message history
Troubleshooting
Bot connects but doesn’t respond
Cause: Missing MESSAGE CONTENT INTENT Solution:- Go to Discord Developer Portal → Your App → Bot
- Scroll to Privileged Gateway Intents
- Enable MESSAGE CONTENT INTENT
- Click Save Changes
- Restart
picoclaw gateway
”Missing Access” or “Missing Permissions” errors
Cause: Bot lacks required permissions in the channel Solution:- Check the bot’s role permissions in server settings
- Ensure the bot role has:
- Read Messages
- Send Messages
- Read Message History
- Check channel-specific permission overrides
Bot is online but doesn’t see messages
Possible causes:- Intent not enabled: Enable MESSAGE CONTENT INTENT (see above)
- Allow list: Check if your user ID is in
allow_from - Wrong channel: Bot might not have access to the channel
- Group trigger: Check if
mention_onlyis enabled and you forgot to @mention
”Invalid Token” error
Cause: Incorrect or expired bot token Solution:- Go to Developer Portal → Your App → Bot
- Click Reset Token
- Copy the new token
- Update
config.jsonwith the new token - Restart gateway
Check Gateway logs
Advanced Configuration
Per-Server Settings
Currently, PicoClaw uses global configuration for all Discord servers. To have different behavior per server, you would need to run multiple bot instances with different tokens.Multiple Bots
You can run multiple Discord bots by:- Creating multiple applications in Developer Portal
- Using different configuration files:
Using with Docker
Docker deployments work the same way:docker/data/config.json has the Discord configuration.
Privacy & Security
Message Privacy
Discord bots can see:- All messages in channels where they have access
- Message history (if Read Message History is enabled)
- User IDs, usernames, and avatars
- Server information
- What data your LLM provider logs
- What conversation context is stored locally
- Privacy expectations of server members
Complete Example
Next Steps
Telegram Channel
Easier alternative with simpler setup
WhatsApp Channel
Connect via WhatsApp
Channel Overview
Compare all available channels
Configuration
Advanced configuration options