add weather

This commit is contained in:
2025-06-06 20:14:50 -05:00
parent 6ec931265f
commit 4d2a0dc2d9
4 changed files with 203 additions and 133 deletions

View File

@ -10,6 +10,7 @@ from garfpy import (
Kroger,
GarfAI,
GarfbotRespond,
WeatherAPI,
)
@ -28,6 +29,7 @@ garf_respond = GarfbotRespond()
garfield = GarfAI()
iputils = IPUtils()
kroger = Kroger()
weather = WeatherAPI()
@garfbot.event
@ -107,6 +109,12 @@ async def on_message(message):
)
await garfield.garfpic(message, prompt)
# Weather
elif lower.startswith("garfbot weather "):
location = lower[16:]
embed = await weather.weather(location)
await message.channel.send(embed=embed)
# GarfBot help
elif lower.strip() == "garfbot help":
embed = discord.Embed(title="**Need help?**", color=0x4D4D4D)