The short answer
- 1By default a bot in a group receives only its commands, replies to it and service messages.
- 2For everything, make it an admin or turn privacy off with /setprivacy, then re-add it.
- 3force_reply and inline buttons work whatever the mode.
In this article
By default a bot gets only what concerns it
Adding a bot to a group does not hand it the whole conversation. Telegram bots have privacy mode turned on by default, and in that mode a bot receives only the messages related to it.
| Received in privacy mode | Example |
|---|---|
| Commands addressed to that bot | /help@your_bot |
| General commands, if this bot was the last to post | A /cancel right after the bot asked something |
| Replies to the bot's own messages | A member using Reply on the bot's question |
| Messages sent via that bot | A result picked with @your_bot query |
| Service messages | Members joining or leaving, pinned messages |
To see which mode your bot is in, call getMe: can_read_all_group_messages is false when privacy mode is on. See your first Bot API requests.
When your bot needs every message
| Method | Result | When |
|---|---|---|
| Make the bot an admin | Receives all messages whatever its privacy setting | Bots that run the group: deleting banned words, checking new members |
| Turn privacy mode off | Receives all messages without being an admin | Only when it has to read the conversation but needs no admin rights |
To turn it off, choose your bot in @BotFather, send /setprivacy and pick Disable. The change does not apply to groups the bot is already in. Remove the bot from each group and add it again.
Before you turn it off
The official documentation recommends turning privacy mode off only when you really need to. In the group's member list, a bot with privacy off is shown as having access to messages, which can make members uneasy. Receiving everything also makes you responsible for everything you receive: process only the messages you need and do not store the rest.
If you run the group rather than the bot, check what each bot can see before you add it or make it an admin; see bot accounts vs user-account automation and what inline bots can and cannot see.
Design the bot to work in privacy mode
- Questions that need an answer: send them with
force_reply. The user's app starts a reply to the bot's message automatically, so the answer reaches the bot even in privacy mode. - Commands in groups: tell members to use the
/command@your_botform; see registering bot commands. - Choices: collect them with inline buttons. Button taps reach the bot whatever the privacy setting; see bot buttons.
FAQ
Why doesn't my Telegram bot receive group messages?
Privacy mode is on by default, so it only receives commands, replies to its messages and service messages.
How do I turn off privacy mode for my bot?
Send /setprivacy to @BotFather, pick your bot and choose Disable, then remove the bot from the group and add it again.
Can members tell if a bot reads all messages?
Yes. The group member list shows whether a bot has access to messages.
Sources
At a glance
- 1Default
Privacy mode on: only messages related to the bot.
- 2All messages
Admin rights, or /setprivacy Disable and re-add the bot.
- 3Design
force_reply, /command@bot and inline buttons.
Updated