basic /start function :param update: :param context: :return:
(self, update, context)
| 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 | """ |
nothing calls this directly
no test coverage detected