Fixing typo in sql statement

pull/9/head
sgoudham 4 years ago
parent 892c4cbec6
commit 170b01e644

@ -58,8 +58,7 @@ class Starboard:
# Update the stars that the message has in the database and then store the message id's # Update the stars that the message has in the database and then store the message id's
try: try:
update = """UPDATE starboard_messages SET stars = $1, star_message_id = $2 update = """UPDATE starboard_messages SET stars = $1, star_message_id = $2 WHERE root_message_id = $3 AND guild_id = $4"""
WHERE root_message_id = $3 AND guild_id = $4"""
await conn.execute(update, new_stars, star_message.id, message.id, payload.guild_id) await conn.execute(update, new_stars, star_message.id, message.id, payload.guild_id)
# Catch errors # Catch errors
@ -104,7 +103,7 @@ class Starboard:
# Update the stars that the message has in the database and then store the message id's # Update the stars that the message has in the database and then store the message id's
try: try:
update = """UPDATE starboard_messages SET stars = $1, WHERE root_message_id = $2 AND guild_id = $3""" update = """UPDATE starboard_messages SET stars = $1 WHERE root_message_id = $2 AND guild_id = $3"""
await conn.execute(update, new_stars, message.id, payload.guild_id) await conn.execute(update, new_stars, message.id, payload.guild_id)
# Catch errors # Catch errors

Loading…
Cancel
Save