我可以使用 Telegram bot api 检测我的 bot 组吗

Can i detect my bot's groups with Telegram bot api

我可以检测我的机器人是否被添加到组或获取包含我的机器人的列表组吗?可能吗? 我的版本是从群组转发消息到我的机器人并从消息中获取聊天 ID,但我认为这不是最佳解决方案

机器人获取 Updatenew_chat_membersUser 的数组)

正如电报机器人 API 所说 new_chat_members 是:

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

如果您的机器人 Updatenew_chat_members 中,只需从 Update

中获取 chat_Id