Built a Telegram Bot to tell me when it rains
I put Claude Sonnet 4.6 to the test by asking it help me build a Telegram Bot. I've always wanted to build a bot like that, and now it's possible. Yay. First I looked at all the possible real-time datasets on rainfall in Singapore, then zoomed in on the one from data.gov.sg by NEA. So here's my starting prompt:-
Hi, I would like to create a telegram bot called theraincheck_bot, which will send a message when there's rain approaching 30 minutes from the time sent. It will check real-time data from the API from data.gov.sg, NEA's realtime rainfall data. The country is Singapore and users can specify which part of Singapore they want to check, for example, downtown, yishun, woodlands, etc. What programming language should I use and how should I start building this?
Claude then proceeded to break down the steps I need to build it. Guided me through: – libraries to install – how to call the NEA API – how to create a bot on Telegram using @botfather – how to host my files on AWS Lightsail – taught me how to secure my files – helped me tweak the code to incorporate my new requests, like wording changes, logic updates (I wanted the user to be able to ping the bot for on-demand rainchecks vs just being ping'd are scheduled intervals)
The whole experience just took one day and another half a day for tweaks.
Want to check out my bot? The Rain Check Bot [by Bernie]
I'm going to build a transport bot next ...