Log in here to report bugs or suggest features. Please enter your phone number in the international format and we will send a confirmation message to your account via Telegram.
We've just sent you a message.
Please confirm access via Telegram
Hi! Since a few weeks ago, my bots that use the Telegram Bot API sometimes lead the bot into a state where it's unable to edit its own messages. All other functionalities of the bot API function correctly (posting and deleting messages, replying to user messages, etc). This is random as some bot tokens will never exhibit this problem, while others immediately start failing at updating messages minutes after the bot was created and the script was launched. It's interesting to note that, if a bot at some point fails to update messages, it will then fail forever, never being able to recover from that bug. Only a fresh bot can solve it, as even refreshing the token for a new one doesn't solve it. Once the bot is "stuck" in that state, even sending manual HTTP requests to the Bot API to edit messages will silently fail (the response is "OK" with the edit time and edited message, but the message doesn't change in the client). This is not a client issue as it happens on all platforms without exception. The source code for the bot can be found at https://github.com/beeb/pancaketrade . This feels like a backend issue but I was unable to solve it.
- https://github.com/beeb/pancaketrade/blob/e4227ce9ed7a40cc460170d23c4c0276cae0ad8a/pancaketrade/utils/generic.py#L82
- https://github.com/beeb/pancaketrade/blob/e4227ce9ed7a40cc460170d23c4c0276cae0ad8a/pancaketrade/bot.py#L254
- https://github.com/beeb/pancaketrade/blob/e4227ce9ed7a40cc460170d23c4c0276cae0ad8a/pancaketrade/bot.py#L265
So the fact that you don’t see any error might be because they are all handled and therefore not logged.
Also, for the future, I suggest to send a Simple MWE where you can reproduce the issue instead of a long code, check here how to make a good MWE: https://stackoverflow.com/help/minimal-reproducible-example