Creating Your Discord Bot
Step 1: Discord Developer Portal
Step 2: Enable Required Intents
Critical: Under "Privileged Gateway Intents", enable:
Without Message Content Intent, your bot cannot see message text!
Step 3: Generate Invite URL
-
bot-
applications.commands- Send Messages
- Read Message History
- Add Reactions
- Attach Files
- Embed Links
Step 4: Configure OpenClaw
openclaw config set channels.discord.token "YOUR_BOT_TOKEN"Guild (Server) Configuration
Allow Specific Guilds
{
"channels": {
"discord": {
"enabled": true,
"guilds": {
"123456789": {
"channels": ["*"],
"requireMention": true
}
}
}
}
}Disable Mention Requirement
To let the bot respond without being mentioned:
{
"guilds": {
"123456789": {
"requireMention": false
}
}
}Note: requireMention must be under the guild config, not at the channel level.
Common Errors
"Used disallowed intents"
Cause: Message Content Intent not enabled in Developer Portal.
Fix: Go to Bot settings → Enable "MESSAGE CONTENT INTENT"
Bot Online but Not Responding
Check:
requireMention is correctly placed in configChannel Not in Allowlist
If using specific channel IDs:
{
"guilds": {
"123456789": {
"channels": ["987654321", "456789123"]
}
}
}Need Help?
Discord setup can be tricky. Contact us for expert configuration.