#Why I get "channel not allowed" messages?
1 messages · Page 1 of 1 (latest)
Usually because Discord is blocking the channel/guild route, not the model switch.
A few important bits:
channels.discord.groupPolicyis often the reason. If it'sallowlist, the guild must be allowlisted, and if that guild has achannelsmap, the current channel/thread must be allowed too.- If you only set
DISCORD_BOT_TOKENand never added a realchannels.discordconfig block, Discord still falls back to fail-closed allowlist mode. - If you're using
/modelor another command, also checkcommands.allowFrom. When that is set, it becomes the only command allowlist.
Quick checks:
openclaw --version
openclaw channels status --probe
openclaw doctor
Typical fix shape:
{
channels: {
discord: {
groupPolicy: "allowlist",
guilds: {
"YOUR_GUILD_ID": {
requireMention: true,
channels: {
"YOUR_CHANNEL_OR_PARENT_CHANNEL": { allow: true },
},
},
},
},
},
}
Also, Discord threads inherit the parent channel config unless you override them.
Docs:
- https://docs.openclaw.ai/channels/discord
- https://docs.openclaw.ai/channels/groups
- https://docs.openclaw.ai/channels/troubleshooting
If you paste your openclaw --version plus your channels.discord and commands.allowFrom config, I can tell you the exact line to change.
I wonder why OpenClaw created a default Discord account on config even when I explictly avoided creating it.
Yeah, that’s usually intentional.
OpenClaw has a real default account concept for channels, and Discord hits it in two common cases:
DISCORD_BOT_TOKENis only used as env fallback for the default Discord account.- If you started with single-account Discord config at the top level, then later moved toward multi-account config, OpenClaw may promote the old config into
channels.discord.accounts.defaultso existing routing keeps working.
So if accounts.default appeared, it usually means one of these happened:
- you still had top-level Discord account keys like
channels.discord.token, or - setup /
channels add/doctor --fixpromoted the old single-account shape into multi-account form.
If you want a named-account-only setup, use something like:
{
channels: {
discord: {
defaultAccount: "main",
accounts: {
main: {
token: "...",
},
},
},
},
}
And make sure you remove any top-level channels.discord.token.
One important gotcha: if you rely on DISCORD_BOT_TOKEN, that already implies the default Discord account. So a truly named-only setup needs the token under accounts.<name> in config, not just the env var.
Docs:
- https://docs.openclaw.ai/channels/channel-routing
- https://docs.openclaw.ai/channels/discord
- https://docs.openclaw.ai/cli/channels
If you paste your channels.discord block, I can tell you exactly which case you hit.
This makes my life so difficult.. What can I do to disable this?
Yeah, that’s annoying. Short answer: you can’t disable the default-account concept entirely, but you can stop OpenClaw from materializing accounts.default.
Best options:
Option 1, simplest, if you only have one Discord bot
Use single-account config only, no accounts block at all:
{
channels: {
discord: {
token: "...",
groupPolicy: "allowlist",
},
},
}
Option 2, if you want a named account
Use a named account plus defaultAccount, and remove every top-level account key:
{
channels: {
discord: {
defaultAccount: "main",
accounts: {
main: {
token: "...",
},
},
},
},
}
For this second setup, make sure you do not also have any of these hanging around:
channels.discord.tokenchannels.discord.accounts.defaultDISCORD_BOT_TOKEN
If any of those still exist, OpenClaw may keep treating/promoting them as the default Discord account.
So my recommendation:
- One bot only → use top-level
channels.discord.token - Multiple Discord accounts → use
accounts.<name>+defaultAccount - Don’t mix both shapes
Docs:
If you paste your current channels.discord block, I can rewrite it into the clean shape you want.
The thing is, I want to support multiple accounts in the future for multiple agents. This autopromoting stuff isn't really helping with this purpose at all.
I’m with you, that behavior is mostly a backwards-compat bridge, not the clean end state for multi-account setups.
For what you want, I’d do this instead:
- Go fully account-scoped now
- Never use top-level
channels.discord.token - Never rely on
DISCORD_BOT_TOKEN - Set an explicit
defaultAccount - Use explicit
accountIdin every binding
Example:
{
agents: {
list: [{ id: "main" }, { id: "coding" }],
},
bindings: [
{ agentId: "main", match: { channel: "discord", accountId: "mainbot" } },
{ agentId: "coding", match: { channel: "discord", accountId: "codingbot" } },
],
channels: {
discord: {
defaultAccount: "mainbot",
accounts: {
mainbot: {
token: "...",
},
codingbot: {
token: "...",
},
},
},
},
}
That gives you:
- no
accounts.defaultrequired - clean agent-per-bot routing
- no future autopromotion surprises
Important bit: if a binding omits accountId, it only matches the default account. So for multi-agent Discord, I’d make accountId explicit everywhere.
Autopromotion only really kicks in when OpenClaw sees the old single-account shape and tries to preserve it while moving toward multi-account. Once your config is fully account-scoped, it should stop being a problem.