1

In the process of adding Telegram bot to a group, the /setprivacy is set to Enable, so that whenever the user mention the bot using the username of bot or '/', the bot will get the message. Despite of this enable setting, the bot still receives the query from the user and replying to it.

More info:-

  1. I set the bot as a Administrator of that group to access message
  2. /setprivacy status Enabled (I tried switching it to Disabled and Enable it again, not working)

Anyone please help me on this issue.

Thanks

Ashik Mydeen
  • 104
  • 7
  • 1
    please remove the `python-telegram-bot` tag, as this question is about telegram bots in general and not about that library in particular ;) – CallMeStag Sep 29 '21 at 19:16

1 Answers1

3

A bot set as administrator will always receive all messages, no matter the privacy setting. See https://core.telegram.org/bots#privacy-mode.

Privacy mode is enabled by default for all bots, except bots that were added to the group as admins (bot admins always receive all messages).

You need to either revoke your bot's admin status or program your bot not to reply to a user's query.

newsha
  • 1,288
  • 1
  • 10
  • 13
  • So as per the documentation, we can't able to get the user text unless the bot becomes admin of that group, right? – Ashik Mydeen Sep 29 '21 at 11:57
  • 1
    You **can** get user messages even with non-admin bot. Just note it depends what this text looks like. Message will be visible when starting with `/`, or are direct reply to the bot . Whereas admin bots have privilege to read _any_ message. – newsha Sep 29 '21 at 12:15