From ce72d0c6bfe53139c0519cfb5b9f9f744bd9f8bd Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 5 Oct 2023 14:14:05 -0400 Subject: [PATCH] fix(moderation): resolved moderations with a duration will now be considered "expired" --- moderation/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index a9c8ba2..229a4d3 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" + query = f"UPDATE `{db}`.`moderation_{guild.id}` SET expired = 1 WHERE (end_timestamp != 0 AND end_timestamp <= %s AND expired = 0) OR resolved = 1" cursor.execute(query, (time.time(),)) database.commit() cursor.close()