diff --git a/moderation/moderation.py b/moderation/moderation.py index 229a4d3..32d8a0a 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 != 0 AND end_timestamp <= %s AND expired = 0) OR resolved = 1" + query = f"UPDATE `{db}`.`moderation_{guild.id}` SET expired = 1 WHERE (end_timestamp != 0 AND end_timestamp <= %s AND expired = 0) OR (expired = 0 AND resolved = 1)" cursor.execute(query, (time.time(),)) database.commit() cursor.close()