I decided to make this bot for myself at first. I wanted to keep track of new cases updates, and then I realized this Bot could be used by more people in Brazil

What it does

The bot periodically fetches latest information from trustworthy sources (official Health Minister portal and states), compares the current number of infected people by COVID-19 in Brazil and notifies every subscriber on change event.

How I built it

I used Node.js and node-telegram-bot-api library. Source code can be found at: Database storage, I used LowDB.

Challenges I ran into

At first, I used to have messages sent in sequence. That worked fine until we hit the ~600 users, which required to rewrite a parallelized version of the messaging function. Now we can send ~20-25 messages, which takes ~5 minutes to message all of our 5.5+ users.

Accomplishments that I'm proud of

Created an option to limit message interval and use specific receive times. Kind of like a "DnD" option. Also, created a dynamic table to show cases by state.

What I learned

Telegram Bots are an easy way to create real-time-update subscriptions. Much easier than, for example, creating an app or website. In times like these it's worth it to sacrifice UI looks for functionality.

What's next for Coronavirus Bot

I'd like to make this a worldwide project with the help of more people. Also wanted to say thanks to the team responsible for collecting all state-cases related information. This wouldn't be possible without them.

Try It out



node.js, telegram-api

Devpost Software Identifier