Skip to content

Commit

Permalink
Url cleaner on_message ignore messages outside guilds
Browse files Browse the repository at this point in the history
  • Loading branch information
jackra1n committed Sep 9, 2024
1 parent 8580242 commit b25a6fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/url_cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ async def on_message(self, message: discord.Message):
if message.content.startswith(config.BOT_PREFIX):
return

if not message.guild:
return

# check if server has URL cleaner enabled
url_cleaner_settings = await self.bot.db.pool.fetchrow(
"SELECT * FROM url_cleaner_settings WHERE discord_server_id = $1", message.guild.id
Expand Down

0 comments on commit b25a6fe

Please sign in to comment.