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 👇
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
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)
Cool Title Used
Part3 is out: dev.to/nagi/part-3-im-building-a-t...
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.
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 :)
Part1: dev.to/nagi/im-building-a-telegram...