diff --git a/moderation/moderation.py b/moderation/moderation.py index b0b497a..a9c8ba2 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -411,7 +411,7 @@ class Moderation(commands.Cog): db = await self.config.mysql_database() guilds: list[discord.Guild] = self.bot.guilds for guild in guilds: - query = f"UPDATE `{db}`.`moderation_{guild.id}` SET expired = 1 WHERE end_timestamp <= %s AND expired = 0" + query = f"UPDATE `{db}`.`moderation_{guild.id}` SET expired = 1 WHERE end_timestamp != 0 AND end_timestamp <= %s AND expired = 0" cursor.execute(query, (time.time(),)) database.commit() cursor.close()