MCPcopy Create free account
hub / github.com/eternnoir/pyTelegramBotAPI / __retrieve_updates

Method __retrieve_updates

telebot/__init__.py:677–693  ·  view source on GitHub ↗

Retrieves any updates from the Telegram API. Registered listeners and applicable message handlers will be notified when a new message arrives. :meta private: :raises ApiException when a call has failed.

(self, timeout=20, long_polling_timeout=20, allowed_updates=None)

Source from the content-addressed store, hash-verified

675 self.get_updates(offset=-1)
676
677 def __retrieve_updates(self, timeout=20, long_polling_timeout=20, allowed_updates=None):
678 """
679 Retrieves any updates from the Telegram API.
680 Registered listeners and applicable message handlers will be notified when a new message arrives.
681
682 :meta private:
683
684 :raises ApiException when a call has failed.
685 """
686 if self.skip_pending:
687 self.__skip_updates()
688 logger.debug('Skipped all pending messages')
689 self.skip_pending = False
690 updates = self.get_updates(offset=(self.last_update_id + 1),
691 allowed_updates=allowed_updates,
692 timeout=timeout, long_polling_timeout=long_polling_timeout)
693 self.process_new_updates(updates)
694
695 def process_new_updates(self, updates: List[types.Update]):
696 """

Callers 1

Calls 3

__skip_updatesMethod · 0.95
get_updatesMethod · 0.95
process_new_updatesMethod · 0.95

Tested by

no test coverage detected