From 9a68c72d89ab7ceb2d42825adbeea152cad66030 Mon Sep 17 00:00:00 2001 From: crate Date: Sun, 8 Jun 2025 13:02:05 -0500 Subject: [PATCH] small fixes --- garfmain.py | 6 ++++-- garfpy/weather.py | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/garfmain.py b/garfmain.py index d222e26..6836ff8 100644 --- a/garfmain.py +++ b/garfmain.py @@ -26,7 +26,9 @@ intents.members = True intents.messages = True intents.message_content = True -garfbot = commands.Bot(command_prefix=["Garfbot ", "garfbot ","Garf", "garf", "$"], intents=intents) +garfbot = commands.Bot( + command_prefix=["Garfbot ", "garfbot ", "Garf", "garf", "$"], intents=intents +) garfbot.remove_command("help") garf_respond = GarfbotRespond() @@ -156,7 +158,7 @@ async def on_message(message): guild_id = message.guild.id # Army of Dawn Server only!! - if guild_id == 719605634772893757: + if garfbot and guild_id == 719605634772893757: await aod_message(garfbot, message) responses = garf_respond.get_responses(guild_id) diff --git a/garfpy/weather.py b/garfpy/weather.py index 1d07024..f3ed5b9 100644 --- a/garfpy/weather.py +++ b/garfpy/weather.py @@ -198,6 +198,9 @@ class WeatherAPI: return embed async def weather(self, ctx, location): + location = "".join( + char for char in location if char.isalpha() or char.isspace() + ) weather_data = await self.get_weather(ctx, location) if weather_data: embed = self.weather_embed(weather_data)