From c13f9a7f98f26d26748591c30d73d290c1a4effa Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Tue, 25 Aug 2020 21:26:28 +0300 Subject: [PATCH 1/2] Add last_update_id parameter for constructor --- telebot/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 3ca0cfe..33c3094 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -92,7 +92,7 @@ class TeleBot: """ def __init__( - self, token, parse_mode=None, threaded=True, skip_pending=False, num_threads=2, + self, token, parse_mode=None, last_update_id=0, threaded=True, skip_pending=False, num_threads=2, next_step_backend=None, reply_backend=None, exception_handler=None ): """ @@ -107,7 +107,7 @@ class TeleBot: self.skip_pending = skip_pending self.__stop_polling = threading.Event() - self.last_update_id = 0 + self.last_update_id = last_update_id self.exc_info = None self.next_step_backend = next_step_backend From 5120650774ec3a321c5532c09256dfc1193cc28e Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Tue, 25 Aug 2020 21:45:30 +0300 Subject: [PATCH 2/2] Move parameter to the end of list --- telebot/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index 33c3094..2a98812 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -92,8 +92,8 @@ class TeleBot: """ def __init__( - self, token, parse_mode=None, last_update_id=0, threaded=True, skip_pending=False, num_threads=2, - next_step_backend=None, reply_backend=None, exception_handler=None + self, token, parse_mode=None, threaded=True, skip_pending=False, num_threads=2, + next_step_backend=None, reply_backend=None, exception_handler=None, last_update_id=0 ): """ :param token: bot API token