A Discord bot that provides weather information and forecasts using the Open-Meteo API.
-
Clone the repository
-
Install required dependencies:
pip install -r requirements.txt
- Create a
.env
file in the project root with the following variables:
DISCORD_TOKEN=your_discord_bot_token
APPLICATION_ID=your_application_id
GEOCODINGAPIKEY=your_openweathermap_api_key
- Make sure all files are in place
- Run the bot:
python main.py
-
/weather [city] [forecast_days] [rnd]
- Get weather information for a citycity
: Name of the cityforecast_days
: Number of forecast days (1-5, default: 3)rnd
: Decimal places for rounding (1-5, default: 2)
-
/settings
- Manage bot settingsset [key] [value]
- Set a configuration key to a valueget [key]
- Get the current value of a configuration keylist
- List all configuration keys and their values
-
Automatic status updates showing temperatures from random cities
-
Cached weather data for better performance
-
Detailed weather information including:
- Current conditions
- Temperature
- Humidity
- Wind speed and direction
- Precipitation
- Daily forecasts