This is the codebase for my Telegram bot. It's a chatbot that I talk to via the Telegram app on my phone and the code in this repository runs on my Raspberry Pi 3B+. I use it to:
- lookup schedules of St. Louis Metro trains
- check the weather forecast via OpenWeatherMap
- track my spending
- Get news articles from NewsAPI
More functionality can be implemented as needed.
The bot does these things by polling Telegram for messages that I send, then sending HTTP requests to other services, some of which I have running on my local network. Once a response is received from one of those services, it is parsed into a message and sent as a response message to me on Telegram.
This code is open source. If you want to run my telegram bot, simply supply your own Telegram bot token as well as any other environment variables necessary. You are more than welcome to fork my code and change it to accommodate your own needs.
- Git clone this repo
- Have Rust installed
- Add necessary environment variables
- Run
cargo run
in your terminal while in this project directory