Go to the Discord Developer Portal and create a new Application. Under the Bot tab, click "Reset Token" to generate a bot token. Copy it immediately because Discord only shows it once.
Under Privileged Gateway Intents, enable Message Content Intent. Without this, your bot receives message events but the content field is empty. I've seen people spend hours debugging this one, so don't skip it.
Add the token to your OpenClaw config:
{
"platform": "discord",
"token": "YOUR_BOT_TOKEN"
}
Save as ~/.openclaw/platforms/discord.json and restart the daemon. Invite the bot to your server using the OAuth2 URL generator with the bot scope and Send Messages permission.