Skip to content

kamolgks/Weather-Bot

Repository files navigation

bot_img

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. Create a .env file in the root directory of your project and add your weather API (OpenWeatherMap) and your bot's token:
API_KEY='YOUR_API_KEY'
BOT_TOKEN='YOUR_BOT_TOKEN'

Usage

  1. Launch the bot:
  • Linux

    • python3 main.py
  • Windows

    • Launch "start.bat"
  1. Connect to chat with the bot.

  2. Enter the command to add your city:

/weather_city


and send name of your city

Tashkent

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.