#Why I get "channel not allowed" messages?

1 messages · Page 1 of 1 (latest)

gaunt summit
#

Why I get "channel not allowed" messages? I'm trying to switch my bot to Claude Opus 4.6

wanton nymphBOT
normal nicheBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

wanton nymphBOT
tidal geyserBOT
#

Usually because Discord is blocking the channel/guild route, not the model switch.

A few important bits:

  • channels.discord.groupPolicy is often the reason. If it's allowlist, the guild must be allowlisted, and if that guild has a channels map, the current channel/thread must be allowed too.
  • If you only set DISCORD_BOT_TOKEN and never added a real channels.discord config block, Discord still falls back to fail-closed allowlist mode.
  • If you're using /model or another command, also check commands.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 },
          },
        },
      },
    },
  },
}
gaunt summit
#

I wonder why OpenClaw created a default Discord account on config even when I explictly avoided creating it.

tidal geyserBOT
#

Yeah, that’s usually intentional.

OpenClaw has a real default account concept for channels, and Discord hits it in two common cases:

  • DISCORD_BOT_TOKEN is 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.default so existing routing keeps working.

So if accounts.default appeared, it usually means one of these happened:

  1. you still had top-level Discord account keys like channels.discord.token, or
  2. setup / channels add / doctor --fix promoted 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.

gaunt summit
#

This makes my life so difficult.. What can I do to disable this?

tidal geyserBOT
#

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.token
  • channels.discord.accounts.default
  • DISCORD_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.

gaunt summit
#

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.

tidal geyserBOT
#

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 accountId in 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.default required
  • 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.