3

Can i detect if my bot was added to group or get list groups where my bot included? Is it possible? My version is forward message from group to my bot and get chat id from message, but I think it's not best solution

pembrock
  • 113
  • 1
  • 10

1 Answers1

4

Bot get's Update with new_chat_members (Array of User)

As Telegram Bot API said new_chat_members is:

New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)

If you've got Update with your bot inside new_chat_members, just fetch chat_Id from Update

  • 1
    Hm. You are right. I thought that when bot was added to chat at first time it can't see self as new member. Thank you – pembrock Sep 11 '18 at 13:58