You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After update group to supergroup with bot: ruby/2.2.0/gems/telegram-bot-ruby-0.4.2/lib/telegram/bot/api.rb:56:incall': Telegram API has returned the error. (ok: "false", error_code: "400", description: "[Error]: Bad Request: group chat is migrated to supergroup chat", parameters: "{"migrate_to_chat_id"=>-*****************}") (Telegram::Bot::Exceptions::ResponseError)`
The text was updated successfully, but these errors were encountered:
I am having the same issue. Correct me if I am wrong, but the way I understand it, is that this error occurs only if a group is upgraded to a supergroup while the bot is a member of the group. (If a bot is added to an existing supergroup this does not occur)
When a group is migrated to a supergroup, it gets a new chat_id that is passed to the bot in the group in the field migrate_to_chat_id. This is now the chat_id that the bot should use to send messages in the group. By using the old one, we get that kind of error.
@atipugin will you be adding the ability to handle the upgraded to supergroup service message to the gem?
I'm not sure how to handle it. Resend message with new chat_id? What if you store your chat ids somewhere in db? In this case you need to handle it by your own.
After update group to supergroup with bot:
ruby/2.2.0/gems/telegram-bot-ruby-0.4.2/lib/telegram/bot/api.rb:56:in
call': Telegram API has returned the error. (ok: "false", error_code: "400", description: "[Error]: Bad Request: group chat is migrated to supergroup chat", parameters: "{"migrate_to_chat_id"=>-*****************}") (Telegram::Bot::Exceptions::ResponseError)`The text was updated successfully, but these errors were encountered: