#log error with discord
1 messages · Page 1 of 1 (latest)
Yep — default here means the Discord account id OpenClaw is starting, not a Discord “default bot” somewhere else.
A /gateway/bot failed (401) is Discord rejecting the bot token. Check the token source in this order:
openclaw --version
openclaw config file
openclaw config get channels.discord
For the default Discord account, the token is usually one of these:
{
channels: {
discord: {
enabled: true,
token: {
source: "env",
provider: "default",
id: "DISCORD_BOT_TOKEN",
},
},
},
}
or, in multi-account config:
channels: {
discord: {
accounts: {
default: {
token: { source: "env", provider: "default", id: "DISCORD_BOT_TOKEN" }
}
}
}
}
Docs note: config token values win over env fallback, and DISCORD_BOT_TOKEN fallback is only for the default account.
Common fixes:
- Make sure you copied the Bot Token from the Discord Developer Portal, not client secret/app id/public key.
- Don’t paste the token here.
- If you use
DISCORD_BOT_TOKEN, make sure the gateway service actually has that env var; exporting it in your current shell won’t update an already-running daemon.