Configures the bot with a Telegram Token. Returns a bot instance.
()
| 23 | |
| 24 | |
| 25 | def configure_telegram(): |
| 26 | """ |
| 27 | Configures the bot with a Telegram Token. |
| 28 | |
| 29 | Returns a bot instance. |
| 30 | """ |
| 31 | |
| 32 | TELEGRAM_TOKEN = os.environ.get('TELEGRAM_TOKEN') |
| 33 | if not TELEGRAM_TOKEN: |
| 34 | logger.error('The TELEGRAM_TOKEN must be set') |
| 35 | raise NotImplementedError |
| 36 | |
| 37 | return telegram.Bot(TELEGRAM_TOKEN) |
| 38 | |
| 39 | |
| 40 | def webhook(event, context): |
no test coverage detected