python telegram bot(Telepot) group chat

故事扮演 提交于 2021-01-27 21:54:38

问题


I'm making telegram bot using telepot.

The group chat message work a handler when it started with '/'.

Is there a way to get all group chat message?


回答1:


there are 2 ways to get all the messages of a group:

1.your bot should be added as an admin in that group.

  1. disable privacy mode in settings of your bot via @botfather(it is enabled as default(except for bots that are added as admin))



回答2:


Bots have a privacy setting that stops them from reading everything that is sent in a group. You can disable this privacy setting by talking to @botfather, or make your bot an admin of the group (admins see everything regardless of the privacy setting).

With the BotFather option just tell him /setprivacy, then choose your bot, and then choose Disable.

Admin settings are on the top_pencil_drawing / administrators if your are on the phone, and on the three_dots_menu / Manage Group / administrators if on desktop.



来源:https://stackoverflow.com/questions/45519466/python-telegram-bottelepot-group-chat

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!