Skip to content

Telegram-bot for viewing the weather in your city. Written in aiogram3. Developer: @kamolgks

License

Notifications You must be signed in to change notification settings

kamolgks/Weather-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bot

WeatherBot

Description

Weather-Bot is a chatbot designed to provide current weather information. The bot uses the weather API to retrieve weather data and can provide the user with up-to-date information about temperature, humidity, wind speed and other meteorological parameters.

Installation

  1. Clone the repository:
git clone https://github.com/kamolgks/Weather-Bot.git && cd Weather-Bot
  1. Install dependencies:
pip install -r requirements.txt
  1. Get the API key for the weather API (OpenWeatherMap) and add it to the file (main.py):
# main.py
# you will find in the code, the api_key field

api_key = "your_api_key"
  1. Insert your bot token into (main.py):
# main.py
TOKEN = getenv("BOT_TOKEN", "YOUR_BOT_TOKEN")

Usage

  1. Launch the bot:
python3 main.py
  1. Connect to chat with the bot.

  2. Enter the command to add your city:

/weather_sity Tashkent
(can also be entered in Russian)

city

And then:

/weather

The bot will respond with the current weather in Tashkent.

result

Teams

  • /weather_sity <city>: Save your city.
  • /weather: Get the current weather for the specified city.

Technologies

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Author

Kamoliddin Tukhtaboev

Contribution

If you would like to contribute to the development of the bot, please create a merge request.