MCPcopy Index your code
hub / github.com/InstaPy/InstaPy / end

Method end

instapy/plugins/telegram_util.py:360–379  ·  view source on GitHub ↗

tidy up things :return:

(self)

Source from the content-addressed store, hash-verified

358 )
359
360 def end(self):
361 """
362 tidy up things
363 :return:
364 """
365 # keep the chat_id session for future reference
366 # so we don't need to send a message each time InstaPy restart to the bot
367 # and we can keep on getting messages when the sessions finishes
368
369 # send one last message to the user reporting the session
370 if (self.__chat_id is not None) and (self.__context is not None):
371 self.__context.bot.send_message(
372 chat_id=self.__chat_id, text=self._live_report()
373 )
374 self.__updater.stop()
375 self.token = ""
376 self.telegram_username = ""
377 self.instapy_session = None
378 self.__chat_id = None
379 self.__context = None

Callers

nothing calls this directly

Calls 2

_live_reportMethod · 0.95
send_messageMethod · 0.80

Tested by

no test coverage detected