add weather
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user