From 7987609b46ddecb95f655844b2a84da180c9c936 Mon Sep 17 00:00:00 2001 From: jigsaw Date: Fri, 18 Oct 2024 19:17:07 +0800 Subject: [PATCH] :bug: sleep after exception --- nonebot/adapters/telegram/adapter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nonebot/adapters/telegram/adapter.py b/nonebot/adapters/telegram/adapter.py index e4e8612..ce42e6c 100644 --- a/nonebot/adapters/telegram/adapter.py +++ b/nonebot/adapters/telegram/adapter.py @@ -97,6 +97,7 @@ async def poll(self, bot: Bot): update_offset = updates[0].update_id except Exception as e: log("ERROR", f"Get updates for bot {bot.self_id} failed", e) + await asyncio.sleep(5) def setup_polling(self, bot: Bot): @self.on_ready