fix weather regex
All checks were successful
Garfbot CI/CD Deployment / Deploy (push) Successful in 5s
All checks were successful
Garfbot CI/CD Deployment / Deploy (push) Successful in 5s
This commit is contained in:
@ -27,7 +27,9 @@ intents.messages = True
|
|||||||
intents.message_content = True
|
intents.message_content = True
|
||||||
|
|
||||||
garfbot = commands.Bot(
|
garfbot = commands.Bot(
|
||||||
command_prefix=["Garfbot ", "garfbot ", "Garf", "garf", "$"], case_insensitive=True, intents=intents
|
command_prefix=["Garfbot ", "garfbot ", "Garf", "garf", "$"],
|
||||||
|
case_insensitive=True,
|
||||||
|
intents=intents,
|
||||||
)
|
)
|
||||||
garfbot.remove_command("help")
|
garfbot.remove_command("help")
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ class WeatherAPI:
|
|||||||
return embed
|
return embed
|
||||||
|
|
||||||
async def weather(self, ctx, location):
|
async def weather(self, ctx, location):
|
||||||
location = re.sub(r"[^a-zA-Z\s]", "", location)
|
location = re.sub(r"[^a-zA-Z0-9\s]", "", location)
|
||||||
weather_data = await self.get_weather(ctx, location)
|
weather_data = await self.get_weather(ctx, location)
|
||||||
if weather_data:
|
if weather_data:
|
||||||
embed = self.weather_embed(weather_data)
|
embed = self.weather_embed(weather_data)
|
||||||
|
Reference in New Issue
Block a user