This is my very simple Telegram bot realization. This project based on Spring Boot and Telegram Bots library.
- Spring Boot 2.7.5
- Spring Data JPA
- Telegram Bots
- Telegram Bots Abilities
- Lombok
- ModelMapper
- A brief summary of the current weather.
- Weather forecast for 5 days.
- A scheduled weather forecast (most likely every 3 hours).
- Localisation selecture feature (currently available at 3 languages)
If you want run this project on your own machine, first of all you need to clone this repository and fill 'application.properties' file with your own data (PosgerSQL database config, Telegram bot API token and OpenWeather API token) and create database with particular table configuration:
CREATE TABLE user_setting(
id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
telegram_user_id int,
language_code varchar(100) NOT NULL,
bot_language_code varchar(100) NOT NULL
);
All weather information provided by OpenWeather API.
If you want to try this bot out, you can do that here (Availability is not guaranteed as it depends on hosting uptime, sorry😅)