MCPcopy Create free account
hub / github.com/serverless/examples / configure_telegram

Function configure_telegram

aws-python-telegram-bot/handler.py:25–37  ·  view source on GitHub ↗

Configures the bot with a Telegram Token. Returns a bot instance.

()

Source from the content-addressed store, hash-verified

23
24
25def 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
40def webhook(event, context):

Callers 2

webhookFunction · 0.85
set_webhookFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected