/weather-bot

A discord weather bot that displays weather information of a given city.

Primary LanguagePython

Weather Bot

About The Project

A discord weather bot that displays weather information of a given city.

Resources and APIs

  • Python 3.9.9
  • Python Discord.py module
  • OpenWeatherMap API
  • Discord API

How to setup

  1. Create a discord bot here and grab the token.

  2. We are going to be using OpenWeatherMap API, which requires an API key, you can get one for free by simple logging in to their website.

  3. Open the main.py file and replace your DISCORD_BOT_TOKEN and OPEN_WEATHER_MAP_API_KEY.

token = 'DISCORD_BOT_TOKEN'
api_key = 'OPEN_WEATHER_MAP_API_KEY'
  1. Before running the bot you will need to install all the requirements with this command:
pip install -r requirements.txt
  1. Start the bot by having the cmd/terminal inside the bot folder and run the following command:
python3 main.py
  1. You're done, enjoy your bot!