diff --git a/extensions/url_cleaner.py b/extensions/url_cleaner.py index 4c67041..9e64204 100644 --- a/extensions/url_cleaner.py +++ b/extensions/url_cleaner.py @@ -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