Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 945 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 945 Bytes

Serverless Telegram Bot

Example of a Telegram bot made on top of Serverless framework for AWS Lambda.

Demo

Just send a message to @serverless_example_bot

Setup

  1. Create a Telegram Bot.
  2. Install Serverless framework
  3. Create a Serverless project
  4. Clone this component repo inside the project's root directory
  5. Run npm install in the component directory
  6. Add TELEGRAM_TOKEN=XXX and WEBHOOK_URL=https://ENDPOINT/bot/process to .env file

Deploy

  1. Set the env vars:
serverless env set -k TELEGRAM_TOKEN -v XXXX
serverless env set -k WEBHOOK_URL -v "https://ENDPOINT/bot/process"
  1. Run serverless dash deploy to deploy your bot's functions
  2. Run setup function (open https://ENDPOINT/bot/setup)
  3. Enjoy your serverless telegram bot!