Follow these steps to set up the bot on your own server:
-
Obtain the Bot Token
Find your Bot Token and insert it into theglobal_variables
. -
Create a Weather API Key
Sign up at OpenWeatherMap to create a Weather API key and insert it into theglobal_variables
. -
Create a Channel on Your Server
Create a channel specifically for the bot to prevent timeouts. The bot will send a message to this channel every 5 seconds. -
Obtain the Channel ID
Find the Channel ID for the newly created channel and insert it into theglobal_variables
. -
Install Required Libraries
Run the following commands to install the necessary libraries:- Install Discord.py:
pip install discord.py
- Install Requests:
pip install requests
- Install JSON:
pip install json
- Install Time:
pip install time
- Install Discord.py:
-
Start the Script
Run theweatherbot.py
script. -
Run Certificate Installation on MacBook
In the Python folder on your MacBook, executeInstall Certificates
command.