Projects /
Bot
Weather Telegram Bot
My first project and my first ever GitHub repository, from 2020. You send the bot a city name, and it tells you the weather there and what to wear.
This is where it started. In December 2020 I wanted to make a Telegram bot, so I made one that tells you the weather. You type a city name, it asks OpenWeatherMap, and it replies with the conditions, the temperature and a piece of advice: under 10 °C it’s “Better to stay at home today”, under 20 °C “Wear something warm”, and anything warmer is “Wear anything you want”.
It’s about 30 lines of Python, and it was also the first thing I ever put on GitHub.
Coming back to it
In 2024 I went back to it, added an English version next to the Ukrainian one, and wrote a proper step-by-step README.
A funny fact (Opsec Level: 1000000)
My OpenWeatherMap API key is still right there in the code. In 2020 I didn’t know about .env and .gitignore files, so I just pasted it directly in the code. I’ve decided to leave it as it is (leaked). It’s a free weather key, and I doubt it even works anymore. The Telegram bot token was leaked in there too, somewhere in the old commits, but the bot itself is long gone (I don’t remember if I deleted the bot from BotFather myself, or did it got nuked by Telegram itself at some point for inactivity or something. But the bot API key was from doesn’t exist anymore anyway), so it doesn’t do anything now.
Opsec Level: 1000000
