Telegram bot that can get the current weather from your IP address
- Clone this repository to your local machine:
git clone https://github.com/lesskop/shtosh-weather-bot.git
-
Install Python 3.10+ version
-
Create a virtual environment. Not necessary, but highly recommended.
-
Install requirements:
pip install -r requirements.txt
- Create an
.env
file in the root of your project directory and add your Telegram bot API token:
BOT_API_TOKEN=bot-token-here
- Create an account on OpenWeatherMap
Hint: you can use temporary mail :)
Сopy and paste the API key into .env
file
WEATHER_API=api-key-here
- Run bot.py from project directory:
python .\shtosh-weather-bot\bot.py
This Telegram bot supports the following commands:
/start
- Start the bot and get a welcome message with the weather at your location./help
- Display the available commands./weather
- Display the weather./wind
- Display wind speed and direction./sun_time
- Display sunrise and sunset times.
This Telegram bot is open source and available under the MIT License.