From 0c004ecf483d25550b08e03fcdfd1636c7a3cef2 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 5 Oct 2023 17:14:04 -0400 Subject: [PATCH] fix(moderation): expire_handler now checks for the expired bool instead of the resolved bool --- moderation/moderation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index 1fcf6da..ca46300 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -364,7 +364,7 @@ class Moderation(commands.Cog): cursor.execute(query_1, (interaction.guild.id, case_number)) result_1 = cursor.fetchone() if result_1 is None: - await interaction.response.send_message(content=f"There is no moderation with a case number of {case_number}!", ephemeral=True) + await interaction.response.send_message(content=f"There is no moderation with a case number of {case_number}.", ephemeral=True) return query_2 = "SELECT * FROM moderation_%s WHERE moderation_id = %s AND resolved = 0;" cursor.execute(query_2, (interaction.guild.id, case_number)) @@ -455,7 +455,7 @@ class Moderation(commands.Cog): db = await self.config.mysql_database() guilds: list[discord.Guild] = self.bot.guilds for guild in guilds: - tempban_query = f"SELECT target_id, moderation_id FROM moderation_{guild.id} WHERE end_timestamp != 0 AND end_timestamp <= %s AND moderation_type = 'TEMPBAN' AND resolved = 0" + tempban_query = f"SELECT target_id, moderation_id FROM moderation_{guild.id} WHERE end_timestamp != 0 AND end_timestamp <= %s AND moderation_type = 'TEMPBAN' AND expired = 0" cursor.execute(tempban_query, (time.time(),)) result = cursor.fetchall() target_ids = [row[0] for row in result]