From 4bcfc34a50f2096d1729711e71c0eba2aabb7734 Mon Sep 17 00:00:00 2001 From: Waffle Date: Fri, 25 May 2018 09:07:59 +0300 Subject: [PATCH] Update _notify_next_handlers and _notify_reply_handlers methods: Now if there wasn't any handler updates, timer willn't start. --- telebot/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 73ab328..f08ebb4 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -1191,7 +1191,7 @@ class TeleBot: for handler in handlers: self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"]) self.reply_handlers.pop(reply_msg_id) - self.reply_saver.start_save_timer() + self.reply_saver.start_save_timer() def register_next_step_handler(self, message, callback, *args, **kwargs): """ @@ -1270,9 +1270,9 @@ class TeleBot: self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"]) self.next_step_handlers.pop(chat_id, None) new_messages.pop(i) # removing message that detects with next_step_handler + self.next_step_saver.start_save_timer() i += 1 - self.next_step_saver.start_save_timer() @staticmethod def _build_handler_dict(handler, **filters):