Skip to content

vaibhavsingh97/serverless-chatbot-demo

Repository files navigation

serverless-chatbot-demo

This is a demo serverless bot which gives excuses.

Demo

Try the bot here 🤖 : t.me/serverlessdemo_bot

Prerequisites

  1. Node.js v6.5.0 or later.
  2. Serverless CLI v1.9.0 or later. You can run npm install -g serverless to install it.
  3. 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.
  4. Set-up your Provider Credentials.

Run

  1. Clone the repository by using this link :
$ git clone https://github.com/vaibhavsingh97/serverless-chatbot-demo
  1. Go to serverless-chatbot-demo/
$ cd serverless-chatbot-demo/
  1. Get a bot from Telegram, sending this message to @BotFather
$ /newbot
  1. Put the token received into a file called serverless.env.yml, like this
$ cat secrets.env.yml
TELEGRAM_TOKEN: <your_token>
  1. Deploy it
$ serverless deploy
  1. With the URL returned in the output, configure the Webhook
$ curl -X POST https://<your_url>.amazonaws.com/dev/set_webhook
  1. 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 😉

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages