Answer the question
In order to leave comments, you need to log in
Telegram bot api error, how to solve?
This thing should change already sent messages:
bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="text")
telebot.apihelper.ApiException: A request to the Telegram API was unsuccessful. The server returned HTTP 400 Bad Request. Response body:
[b'{"ok":false,"error_code":400,"description":"Bad Request: there is no text in the message to edit"}']
"
2020-06-21 20:32:31,444 (__init__.py:443 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. The server returned HTTP 400 Bad Request. Response body:
[b'{"ok":false,"error_code":400,"description":"Bad Request: there is no text in the message to edit"}']"
Answer the question
In order to leave comments, you need to log in
A similar error can occur when you change the text to exactly the same text.
That is, the text "hello cuckoo", you are trying to change to "hello cuckoo".
(PS if anything, telegram cuts off spaces and new lines at the beginning and at the end of the message)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question