bazinga
bazinga

Reputation: 2250

How to add a bot to a Telegram Group?

I've been trying to add a bot to my Telegram group in Android Device but I am not able to do so. I tried @bot_name, /bot_name, but it doesn't work.

Is it possible to add a bot to the group or should I create a new bot using Telegram API (not bot API) so that I can add the contact number to the group?

Upvotes: 54

Views: 234751

Answers (5)

Dipanjan Ghosal
Dipanjan Ghosal

Reputation: 141

I was having trouble finding my bot in the Add Users lists. So,

  1. first I enabled Groups for the Bot by going to Botfather > /mybots > choose bot > Bot Settings > Allow Groups? > Allow.
  2. Then on the mobile app, I went to the bot inbox/dm > tapped on the bot pic > Add to Group or Channel > Choose your group.

This finally helped me add the bot.

Upvotes: 1

Max Makhrov
Max Makhrov

Reputation: 18717

In my case the 2 steps worked:

  1. Added bot to a group as a regular member
  2. Made Bot an admin.

The second step was needed to let Bot respond and sent messages to Group chat.

The response event.postData.contents looked like this:

{
   "ok":true,
   "result":{
      "message_id":31,
      "from":{
         "id":1234567890,
         "is_bot":true,
         "first_name":"bot for custom alerts",
         "username":"mybotname1_bot"
      },
      "chat":{
         "id":-1234567890,
         "title":"group name",
         "type":"group",
         "all_members_are_administrators":true
      },
      "date":1624860599,
      "text":"hi"
   }
}

I needed to receive the chat id (negative number from response) to send messages to the group by Bot.

Upvotes: 3

David Niki
David Niki

Reputation: 1142

Edit: now there is yet an easier way to do this - when creating your group, just mention the full bot name (eg. @UniversalAgent1Bot) and it will list it as you type. Then you can just tap on it to add it.

Old answer:

  1. Create a new group from the menu. Don't add any bots yet
  2. Find the bot (for instance you can go to Contacts and search for it)
  3. Tap to open
  4. Tap the bot name on the top bar. Your page becomes like this: Telegram bot settings
  5. Now, tap the triple ... and you will get the Add to Group button: Adding the bot
  6. Now select your group and add the bot - and confirm the addition

Upvotes: 68

Mojtaba Yeganeh
Mojtaba Yeganeh

Reputation: 2922

Another way :

change BOT_USER_NAME before use

https://telegram.me/BOT_USER_NAME?startgroup=true

Upvotes: 5

ihoru
ihoru

Reputation: 1990

You have to use @BotFather, send it command: /setjoingroups There will be dialog like this:

YOU: /setjoingroups

BotFather: Choose a bot to change group membership settings.

YOU: @YourBot

BotFather: 'Enable' - bot can be added to groups. 'Disable' - block group invitations, the bot can't be added to groups. Current status is: DISABLED

YOU: Enable

BotFather: Success! The new status is: ENABLED.

After this you will see button "Add to Group" in your bot's profile.

Upvotes: 40

Related Questions