Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 1.07 KB

README.md

File metadata and controls

28 lines (18 loc) · 1.07 KB

Telegram bot with weather

This is

Telegram bot that transmits weather information for the specified city. To get weather information, the OpenWeatherMap API is used

We get the API key (Token) from OpenWeatherMap and Telegram. Use your own keys (Token) in the program

How it works

When the user sends a message with the name of the city, the bot checks whether the weather information is in the cache and whether it is valid. If the information is in the cache and it is valid, the bot takes the information. Otherwise, it makes a request to the OpenWeatherMap API to get weather information and stores it in the cache for an hour.

Next, the bot sends the user a message with the weather for the specified city.

Credits