This is a Weather bot for Discord that displays temperature in °F/°C, wind conditions and time
-
Create a Bot account and invite the Bot to a Discord server
-
Add
main.py
andkeep_alive.py
to a new repository on Replit -
Replace
TOKEN
with the Discord Bot token -
The Weather API key can be generated at Weather API and pasted into <WEATHERAPI_KEY>
http://api.weatherapi.com/v1/current.json?key=WEATHERAPI_KEY
Run the following in the bash shell:
pip install discord
pip install requests
- Then run
main.py
, this should generate a URLhttps://Weather.winniiew.repl.co/
that can then be used in UptimeRobot to host the Discord bot.
- Click
+ Add New Monitor
- Select
HTTP(s)
underMonitor Types
- Paste the generated URL
- Change the monitoring interval to 5 minutes
!w COUNTRY, CITY
Example
!w France, Paris
!w STATE, CITY
Example
!w Portland, Maine