From a9b26008d3cb26676cc2b70d8122ef7c95fdce31 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 5 Mar 2019 10:20:51 +0100 Subject: [PATCH] Don't flood telegram with edit message requests --- telegrambot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegrambot.py b/telegrambot.py index 3697bb2e..f3b99f07 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -501,7 +501,7 @@ def on_callback_query(bot: telegram.Bot, update: telegram.Update): except BadRequest: break except TimedOut: - pass + time.sleep(1) except Exception: try: bot.answer_callback_query(update.callback_query.id,