1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

__retrieve_updates split into process_new_updates

This commit is contained in:
ivan tkachenko 2016-02-07 23:45:54 +08:00
parent baacafe3c0
commit 5f9cf881e6

View File

@ -118,6 +118,9 @@ class TeleBot:
logger.debug('Skipped {0} pending messages'.format(self.__skip_updates())) logger.debug('Skipped {0} pending messages'.format(self.__skip_updates()))
self.skip_pending = False self.skip_pending = False
updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout) updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout)
self.process_new_updates(updates)
def process_new_updates(self, updates):
new_messages = [] new_messages = []
new_inline_querys = [] new_inline_querys = []
new_chosen_inline_results = [] new_chosen_inline_results = []