trap all others commands as unknown :return:
(self, update, context)
| 221 | ) |
| 222 | |
| 223 | def _unknown(self, update, context): |
| 224 | """ |
| 225 | trap all others commands as unknown |
| 226 | :return: |
| 227 | """ |
| 228 | if self._check_authorized(update, context): |
| 229 | context.bot.send_message( |
| 230 | chat_id=update.message.chat_id, |
| 231 | text="Sorry I don't understand that command", |
| 232 | ) |
| 233 | context.bot.send_message( |
| 234 | chat_id=update.message.chat_id, |
| 235 | text=" Recognized actions are:\n" |
| 236 | + " - /start (initialize bot) \n" |
| 237 | + " - /report (a live report from the bot)\n" |
| 238 | + " - /stop (force stop the bot)\n", |
| 239 | ) |
| 240 | |
| 241 | def _check_authorized(self, update, context): |
| 242 | """ |
nothing calls this directly
no test coverage detected