Hello everybody, this is my own telegram bot to know how many people are infected by day in Spain. There are many improvements in my mind but right not we only have available one command implemented, you can check it here.
I hope you can give me more ideas, or make this project better, there are a lot of data we can show and a lot of improvements you can give to us! Just fork and PR to the project, every commit will be well received.
First at all you've to create a telegram bot, to do this just follow this steps and copy your telegram token, we'll use later.
We are using Nodejs and Serverless Framework in order to deploy our backend. If you want download the project and try yourself just type the next lines:
First, install node if you don't have it. I like nvm to do this.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
and then, install node stable version
nvm install node stable
then, install serverless globally
npm install -g serverless
npm install serverless-offline --save-dev
now, clone repo and install modules
git clone https://github.com/Chillaso/covid-increment-spain.git
npm i
export your telegram token (without <>)
export TELEGRAM_TOKEN=<your_telegram_token>
make sure you have your AWS credentials configured, if you don't know anything about this, check this guide.
and now, its time to deploy
sls deploy
Open a terminal and enter this, replacing your endpoint that you get it in sls deploy
output.
curl --request POST --url https://api.telegram.org/bot$TELEGRAM_TOKEN/setWebhook --header 'content-type: application/json' --data '{"url": "<your_api_endpoint>"}'
- Get data by day
- Get data by countries
- Better command view in telegram bot
- Cloudwatch event every day sending message with coronavirus news or updating data
- Death and healed information
- ...