#OpenClaw Telegram Forum Topics: Can Slash Commands Be Scoped to One Bot Per Topic?

1 messages · Page 1 of 1 (latest)

prime dove
#

I’m trying to configure OpenClaw so two Telegram bot accounts can stay in the same forum-style Telegram group, but each topic is handled by only its assigned bot.

Desired behavior:

  • In the Roleplay topic, only Avril should respond to slash commands like /new.
  • Roland should stay silent in the Roleplay topic, even though Roland’s bot account is also a member of the group.
  • In Roland’s assigned topic, only Roland should respond.
  • Avril can stay in the group and continue working in her assigned topics.
  • Ideally, each topic’s slash command behavior should follow the topic assignment, not cause both bot accounts to respond.

What’s happening instead:

When I type an unqualified command like /new in the Roleplay topic, both Avril and Roland respond with "New session started." If I use a bot-qualified command like /new@Avril_283_Bot, only Avril responds, but I’m trying to understand whether OpenClaw can enforce this by config so users don’t have to qualify commands manually.

Setup:

  • OpenClaw local macOS LaunchAgent install
  • OpenClaw version: 2026.5.12
  • Telegram channel with multiple bot accounts
  • Telegram group is a forum/supergroup with topics
  • Topic routing is configured in openclaw.json
  • Secrets/bot tokens redacted

Question:

Is there a supported OpenClaw config pattern for topic-scoped native Telegram slash commands, so only the bot assigned to a forum topic handles /new, /reset, etc.? Or are native Telegram slash commands currently scoped per bot account/chat rather than per forum topic, meaning the practical options are bot-qualified commands or disabling native commands on one bot?

sharp turretBOT
#

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

twin baneBOT
# prime dove I’m trying to configure OpenClaw so two Telegram bot accounts can stay in the sa...

I checked the current Telegram docs/source for this. Short answer: there isn't a supported OpenClaw config pattern that makes native Telegram slash commands automatically follow per-topic bot assignment across multiple bot accounts.

OpenClaw does support Telegram forum topic isolation/routing: topics become <chatId>:topic:<threadId>, and channels.telegram.groups.<chatId>.topics.<threadId>.agentId routes that topic to a specific agent. But that is routing after a bot receives/accepts the update; it does not stop another Telegram bot account in the same group from also receiving an unqualified /new.

For native commands, OpenClaw registers Telegram bot commands at startup via setMyCommands, and the handlers are installed per bot account. Telegram also treats /new as a command any bot with that command can see in the group; /new@Avril_283_Bot is the Telegram-side disambiguation.

Practical options right now:

  • use bot-qualified commands like /new@Avril_283_Bot
  • disable native commands on one of the bot accounts with that account’s channels.telegram.accounts.<id>.commands.native: false
  • split bots by group/chat if unqualified commands must be unambiguous
  • use topic agentId routing when one bot account owns the group/topics, rather than multiple bot accounts competing in the same topic

Docs: https://docs.openclaw.ai/channels/telegram#forum-topics-and-thread-behavior and https://docs.openclaw.ai/channels/telegram#native-commands-and-custom-commands

One nuance: per-topic enabled: false / allowlist-style blocking exists, but for native slash commands it can still produce an auth/disabled response from the “wrong” bot, so I would not use that as the clean way to make a bot silently ignore unqualified slash commands.

prime dove
twin baneBOT
# prime dove Is my goal currently possible on any channels like WhatsApp or Discord?

For the exact Telegram goal, Discord is the closest/best fit; WhatsApp is not.

Discord: mostly yes, if you model “topics” as separate channels or forum threads and use separate Discord applications/bots. Discord slash commands are interactions for a selected application, not a plain text message broadcast to every bot. OpenClaw also has guild/channel allowlists and channel/thread session isolation, so you can route or allow each bot/account only where it belongs. For a clean UX, you’d also use Discord permissions/channel access so the “wrong” bot’s commands are not available in that channel. Otherwise users may still see duplicate /new entries from different apps in the command picker.

WhatsApp: no, not in the same way. WhatsApp has no native slash-command surface or forum-topic scope. /new is just a text message in the group; if two linked OpenClaw WhatsApp accounts both receive and authorize that group message, both can handle it. The practical patterns there are separate groups, require distinct mentions/patterns per bot, or configure only one account to accept that group.

So: Discord can be made to match the intent with channel/app scoping. WhatsApp is closer to Telegram text-command behavior, minus forum topics, so it won’t give you clean per-topic native command ownership.

Docs:
https://docs.openclaw.ai/channels/discord
https://docs.openclaw.ai/channels/whatsapp
https://docs.openclaw.ai/channels/channel-routing