Telegram bots2 minutes to read

Why does my Telegram bot reply in private but ignore my group?

Check the starter’s private-chat filter, explicitly addressed commands and Telegram group privacy mode before changing the host or the bot token.

Check the handler and group delivery separately

A Telegram bot can receive group updates while its own code ignores them. Bothosting’s downloadable Telegram examples reply only when the chat type is private and the message text is exactly /start. Adding an unchanged example to a group gives it no group command handler. A private reply followed by silence in a group is expected.

Telegram also applies its own group delivery rules. With privacy mode enabled, explicitly addressed commands such as /status@your_bot can reach the named bot. An arbitrary sentence in a busy group is a poor first test for a command-driven bot. Telegram’s group message delivery rules.

Implement one small group command

Pick a read-only action such as reporting the bot version. In your handler, accept group and supergroup where that action is intended. Recognize the command token and allow the suffix that matches your bot’s username. Send the reply to the incoming message’s chat ID. Keep existing private-chat behavior in its own branch.

For example, if the bot is named BookClubHelperBot, test /status@BookClubHelperBot. A strict comparison against the string /status misses that request. A parser that discards every username suffix can accidentally respond to commands intended for another bot.

Use three messages to isolate the failure

  1. From a human account, send the known-working command privately. This checks the hosted process and its current bot identity.
  2. In a test group containing the bot, send the explicitly addressed group command. Log only the chat type and parsed command name while testing.
  3. If a matching update arrives but nobody sees a reply, check the response from the send call, the target chat ID and the bot’s permission to send in that group.

You can keep privacy mode enabled for this command flow. Use the Telegram setup guide to reproduce the private control with a clean example.