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.
- Clone the repository:
git clone https://github.com/kamolgks/Weather-Bot.git && cd Weather-Bot
- Install dependencies:
pip install -r requirements.txt
- 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"
- Insert your bot token into (
main.py
):
# main.py
TOKEN = getenv("BOT_TOKEN", "YOUR_BOT_TOKEN")
- Launch the bot:
python3 main.py
-
Connect to chat with the bot.
-
Enter the command to add your city:
/weather_sity Tashkent
(can also be entered in Russian)
And then:
/weather
The bot will respond with the current weather in Tashkent.
/weather_sity <city>
: Save your city./weather
: Get the current weather for the specified city.
- Python
- Aiogram
- Weather API
This project is licensed under the GNU General Public License v3.0 - see the LICENSE
file for details.
If you would like to contribute to the development of the bot, please create a merge request.