fix(aurora): fixed /edit command having invalid sql syntax

This commit is contained in:
Seaswimmer 2023-12-30 04:02:20 -05:00
parent b5a971831a
commit 285f36d6af
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -918,10 +918,10 @@ class Aurora(commands.Cog):
cursor = database.cursor() cursor = database.cursor()
if parsed_time: if parsed_time:
update_query = f"UPDATE `moderation_{interaction.guild.id}` SET changes = %s, reason = %s, duration = %s, end_timestamp = %s WHERE moderation_id = %s" update_query = f"UPDATE `moderation_{interaction.guild.id}` SET changes = ?, reason = ?, duration = ?, end_timestamp = ? WHERE moderation_id = ?"
cursor.execute(update_query, (json.dumps(changes), reason, parsed_time, end_timestamp, case)) cursor.execute(update_query, (json.dumps(changes), reason, parsed_time, end_timestamp, case))
else: else:
update_query = f"UPDATE `moderation_{interaction.guild.id}` SET changes = %s, reason = %s WHERE moderation_id = %s" update_query = f"UPDATE `moderation_{interaction.guild.id}` SET changes = ?, reason = ? WHERE moderation_id = ?"
cursor.execute(update_query, (json.dumps(changes), reason, case)) cursor.execute(update_query, (json.dumps(changes), reason, case))
database.commit() database.commit()