我想实现的东西“看起来像”在我的电报机器人动画倒计时:如何使用PyTelegrambotAPI实现倒数计时器?
sent=bot.send_message(message.chat.id,'5')
time.sleep(1)
bot.edit_message_text('4',message.chat.id,sent.message_id)
time.sleep(1)
bot.edit_message_text('3',message.chat.id,sent.message_id)
time.sleep(1)
bot.edit_message_text('2',message.chat.id,sent.message_id)
time.sleep(1)
bot.edit_message_text('1',message.chat.id,sent.message_id)
time.sleep(1)
bot.edit_message_text('0',message.chat.id,sent.message_id)
有时它工作得很好,但有时我得到的错误:
A request to the Telegram API was unsuccessful. The server returned HTTP 400 Bad Request. Response body:error_code:400,description:"Bad Request: message is not modified
众所周知的问题,看看[这个问题](https://stackoverflow.com/questions/41373752/telegram-bot-api-error-when-try-to-edit-message-bad-请求消息未找到) – anatol
我有“消息未修改”而不是“未找到消息” - 这是一个不同的问题 – Ilya
没有像你可以假设的那么不同 - 只是从描述的角度。我的意思是编辑信息问题的共同点。这经常发生,很少解决。 – anatol