From 39734abbc50177f8a6d66d00ef07f9213ec94135 Mon Sep 17 00:00:00 2001 From: Zaid Date: Sat, 6 Jul 2024 23:53:35 +0300 Subject: [PATCH] remove listener after execute it --- tgram/tgbot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tgram/tgbot.py b/tgram/tgbot.py index 1231f05..580ab31 100644 --- a/tgram/tgbot.py +++ b/tgram/tgbot.py @@ -79,6 +79,7 @@ async def _check_update(self: "TgBot", update: "tgram.types.Update") -> None: result = await self._check_cancel(listener.cancel, update) if result: continue + self._listen_handlers.remove(listener) return await self._process_update(attr, listener.next_step) for handler in self._handlers: