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

Method _start

instapy/plugins/telegram_util.py:178–194  ·  view source on GitHub ↗

basic /start function :param update: :param context: :return:

(self, update, context)

Source from the content-addressed store, hash-verified

176 os.remove("{}telegram_chat_id.txt".format(session.logfolder))
177
178 def _start(self, update, context):
179 """
180 basic /start function
181 :param update:
182 :param context:
183 :return:
184 """
185 self.__chat_id = update.message.chat_id
186 if self._check_authorized(update, context):
187 with open(
188 "{}telegram_chat_id.txt".format(self.instapy_session.logfolder), "w"
189 ) as telegramfile:
190 telegramfile.write(str(self.__chat_id))
191
192 context.bot.send_message(
193 chat_id=update.message.chat_id, text="Bot initialized successfully!\n"
194 )
195
196 def _report(self, update, context):
197 """

Callers

nothing calls this directly

Calls 2

_check_authorizedMethod · 0.95
send_messageMethod · 0.80

Tested by

no test coverage detected