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
If you are trying to send a message to supergroup via it's @username instead of chat_id, botogram fails with this error:
16:34.42 - WARNING - Chat 0 is not available to your bot:
16:34.42 - WARNING - The chat with ID 0 doesn't exist
16:34.42 - WARNING - Update #979264137 processing aborted!
Last time it worked in 0.2.2 release. It's been broken since commit 9e142ea
Now if botogram detects string as chat_id it thinks that we are going to send our message to the telegram channel, which has slightly different Telegram API call, where we need to specify "id": 0, "type": "channel".
Because both supergroups and channels have string ids but different API calls, I can't think of any good workaround. The ugly thing would be to make a separate method for sending to supergroups by @username.
The text was updated successfully, but these errors were encountered:
Thank you for this report! I didn't know you can reference supergroups with usernames, so I wrote that code assuming strings are channels.
This is a regression, and I'll make a point release when I have some spare time.
Because both supergroups and channels have string ids but different API calls, I can't think of any good workaround. The ugly thing would be to make a separate method for sending to supergroups by @username.
Well, you can get the ID for both channels and supergroups with getChat, so the fix for this issue is really simple.
This is a bugfix release, which fixes the following things:
* Fix inability to send messages to supergroups by username, using the
deprecated `botogram.Bot.send()` method (GH-74)
If you are trying to send a message to supergroup via it's @username instead of chat_id, botogram fails with this error:
Last time it worked in 0.2.2 release. It's been broken since commit 9e142ea
Now if botogram detects string as chat_id it thinks that we are going to send our message to the telegram channel, which has slightly different Telegram API call, where we need to specify
"id": 0, "type": "channel"
.Because both supergroups and channels have string ids but different API calls, I can't think of any good workaround. The ugly thing would be to make a separate method for sending to supergroups by @username.
The text was updated successfully, but these errors were encountered: