- Go to discord.com/developers/applications → New Application
- Installation page → set Install Link to
None - Bot page:
- Enable Message Content Intent (required)
- Enable Server Members Intent (recommended)
- Presence Intent optional
- Toggle Public Bot off
- Toggle Requires OAuth2 Code Grant off
- Click Reset Token, copy the token
- OAuth2 → URL Generator:
- Scopes:
bot,applications.commands - Permissions: View Channels, Send Messages, Read Message History, Embed Links, Attach Files
- Open the generated URL in browser to invite bot to your server
- Scopes:
curl -H "Authorization: Bot YOUR_TOKEN" https://discord.com/api/v10/users/@meShould return your bot's JSON. If 401, reset the token and try again.
openclaw config set channels.discord.token "YOUR_TOKEN"
openclaw config set channels.discord.enabled true --json
openclaw gateway restartIf logs show pairing required:
openclaw devices list # find pending device
openclaw devices approve <REQUEST_ID>
openclaw gateway restartIf openclaw doctor shows Claude CLI auth unavailable:
claude auth login
openclaw models auth login --provider anthropic --method cli --set-default
openclaw gateway restartRight-click your server icon → Privacy Settings → enable Direct Messages
- In server channels, @mention the bot to trigger a response
- To remove mention requirement for your server:
(Enable Developer Mode in Discord settings, then right-click server → Copy Server ID)
openclaw config set channels.discord.guilds.YOUR_SERVER_ID.requireMention false --json
| Symptom | Fix |
|---|---|
| Bot offline (gray dot) | Token wrong or not set — verify with curl |
Failed to resolve Discord application id |
Token invalid — reset in Developer Portal |
pairing required in logs |
Run openclaw devices list and approve pending device |
| Bot online but silent | Add @mention or disable requireMention |
pairing required for CLI |
Approve device scope upgrade via openclaw devices approve |