аватар question@mail.ru · 01.01.1970 03:00

Telegram-Bot in a common chat

I made a simple Telegram Bottom:

   import  telebotron @bot.message_handler (] )    def   repeat_all_messages  ( message ):   if  (message.text.split () [ 0 ]. Upper () ==  'bot,' ):  Bot.Send_Message (Message.chat.  id ,  'i \' m here ')     

everything works fine, but when I add it to the group chat, it is silent. Tell me how to make it adapted to group chats?

аватар answer@mail.ru · 01.01.1970 03:00

There are several options:

  1. You can contact the bot through the slash / - /youurmessage , if there are several bots, then with the mention of its useame - /youurmessage @youurbotname .
  2. You can set a list of commands using @botfather, then when you enter a slash, the user will see the list of all available commands and will be able to choose the right one. Mode , then to the bot will receive all messages from the group, except for messages from other bots. By default private mode is included.
  3. you can make a bot administrator of the group, which will also allow you to receive all messages from the group, except messages from other bots.
  4. What Messages Willll My Bot Get? Privacy Mode only Applies to Messages in Groups. For Supergroups, Privacy Mode Is Set to your Bot Was Using When IT Joined the Group & Mdash; IF YOU CHANGE It Later, You'll Need to Remove the Bot and Add IT AGain For Changes to Take Effect. By Default, Your Bot Runs in Privacy Mode and Only Sees The Following Messages in Groups (Or Supergroups):

    replies to the Bot's other Sent Via A Custom Keyboard Ares a Reply to the Bot). Commands from Users Meant for Your Bot (E.G. /Start@Yourbot). General Commands from Users (E.G. /Start) IF Your Bot Was The Last Bot Sent a Message to the Group. Service Messages (E.G. when Somebody Leaves or Joins a Group, Group Name or Photo Changes, etc.). IF YOUR BOT IS ADMIN OR IF Privacy Mode is Disabled, Your Bot Will Get All Messages Sent to the Group, Except for Messages from Other Bots.

Latest

Similar