This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import re
|
||||
import config
|
||||
import discord
|
||||
import aiohttp
|
||||
import config
|
||||
from garfpy import logger
|
||||
|
||||
|
||||
@ -198,9 +199,7 @@ class WeatherAPI:
|
||||
return embed
|
||||
|
||||
async def weather(self, ctx, location):
|
||||
location = "".join(
|
||||
char for char in location if char.isalpha() or char.isspace()
|
||||
)
|
||||
location = re.sub(r"[^a-zA-Z\s]", "", location)
|
||||
weather_data = await self.get_weather(ctx, location)
|
||||
if weather_data:
|
||||
embed = self.weather_embed(weather_data)
|
||||
|
Reference in New Issue
Block a user