DEV Community

Cover image for Part 2: I'm building a telegram bot to remind me changing my car oil
Ahmed Nagi
Ahmed Nagi

Posted on

Part 2: I'm building a telegram bot to remind me changing my car oil

Part 2 of my journey to create a telegram bot that will remind changing my car oil for me.

Today was productive.

  • I were able to produce some basic output.
  • I figured out the stack I'm going to use.

I decided to use for the backend nodejs since it is the easiest to get started with.

For the database I decided to go with firebase for the generous free tire and realtimeness.

npm package: node-telegram-bot-api as the wrapper to work with the telegram bot api.

I wanted to use Vercel for development but it kinda sucks with debuging so I used ngrok to tunnel requests to my local node server.

Didn't want to use frameworks or complicated file structure I stucked with the simplest working structure 👇

Project structure

Spent most of the day lurking around telegram bot API, understanding how to send simple messages and get responses.

https://core.telegram.org/bots/api/

Firebase will store the state like only display welcome message once to the users.

EasyCron will hit the server every 3 hours to calculate how needs to be reminded

https://easycron.com

I see piece falling into their place, It's been only a one day and I could tell that I finished 50%.

I'll keep posting about the details of this light piece of software.

Follow for more...

Top comments (5)

Collapse
 
shriekdj profile image
Shrikant Dhayje

Cool Title Used

Collapse
 
nagi profile image
Ahmed Nagi
Collapse
 
codewithashish profile image
code-withAshish

i would highly recommend you to use another bot framework called 'grammyjs' as 'node-telegram-bot-api' is quite outdated and won't scale good when your project gets cimplicated.

Collapse
 
nagi profile image
Ahmed Nagi

OMG, if you only came 1 day earlier !

I already build a mini framework around the complexity of 'node-telegram-bot-api'

No problem I'll use it when it scales :)

Collapse
 
nagi profile image
Ahmed Nagi