Skip to main content
You need a Discord account, permission to add apps to your server, and a running OpenClaw install with a usable model provider.

Create and invite the bot

  1. Create an application in the Discord Developer Portal.
  2. Open Bot, generate/reset the token, and copy it privately. Reset an exposed token immediately.
  3. Enable Message Content Intent for normal server-message processing. Enable other privileged intents only when the features you use need them.
  4. In the OAuth2 URL Generator, select bot and applications.commands. Grant the permissions your bot needs, including View Channels, Send Messages and Read Message History; media and threads need additional permissions.
  5. Open the generated invite URL and authorize it for your server.
The application name, bot username and server nickname can differ. Follow OpenClaw’s Discord setup for the complete permission checklist and current portal controls.

Connect it to OpenClaw

During installation, paste the token into Discord bot token. For an existing install, set DISCORD_BOT_TOKEN as a sensitive value in Variables, then click Apply changes. This redeploys the app and interrupts its connection; there is no Channels multiselect. If a token is already stored in OpenClaw’s own configuration, check it too: it can override the environment value.

Verify and approve access

Once the bot is online, send it a direct message. With the default pairing policy, approve your own account from the OpenClaw Terminal:
Replace PAIRING_CODE with the code belonging to a sender you recognize. Allow bot DMs in Discord’s privacy settings if needed. Channel pairing is separate from Control UI browser approval. For server conversations, configure the permitted server/channel IDs and sender policies in OpenClaw. Test with an explicit bot mention. Discord permissions alone do not grant access through OpenClaw’s allowlists. See Discord access configuration.

Troubleshooting

  • Offline: check the token, both running states, outbound connectivity and gateway/intents errors in Logs.
  • Online but silent: check sender pairing, server/channel allowlists, mention requirements, permissions, model access and Message Content Intent.
  • Only some channels fail: inspect channel/category permission overrides and OpenClaw’s channel configuration.
  • Slow or failed replies: inspect API rate-limit errors and the model provider. Follow the retry delay reported by the service; there is no fixed cooldown guarantee.