This is a demo serverless bot which gives excuses.
Try the bot here 🤖 : t.me/serverlessdemo_bot
- Node.js v6.5.0 or later.
- Serverless CLI v1.9.0 or later. You can run
npm install -g serverless
to install it. - An AWS account. If you don't already have one, you can sign up for a free trial that includes 1 million free Lambda requests per month.
- Set-up your Provider Credentials.
- Clone the repository by using this link :
$ git clone https://github.com/vaibhavsingh97/serverless-chatbot-demo
- Go to
serverless-chatbot-demo/
$ cd serverless-chatbot-demo/
- Get a bot from Telegram, sending this message to @BotFather
$ /newbot
- Put the token received into a file called serverless.env.yml, like this
$ cat secrets.env.yml
TELEGRAM_TOKEN: <your_token>
- Deploy it
$ serverless deploy
- With the URL returned in the output, configure the Webhook
$ curl -X POST https://<your_url>.amazonaws.com/dev/set_webhook
- With the URL returned in the output, check the Webhook is successfully set or not
$ curl -X POST https://<your_url>.amazonaws.com/dev/get_webhook_info
It should output the above URL returned in the output
Now, you can ask bot to get new excuses 😉