fix(aurora): fixed /edit command having invalid sql syntax
Some checks failed
Pylint / Pylint (3.11) (push) Failing after 42s

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

View file

@ -918,10 +918,10 @@ class Aurora(commands.Cog):
cursor = database.cursor()
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))
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))
database.commit()