Adding await to cursor

pull/8/head
sgoudham 4 years ago
parent a4cb604dec
commit d0dc1a6618

@ -131,9 +131,9 @@ class Relationship(commands.Cog):
proposee = ctx.author.id, message_time, member.id, guild.id, proposee = ctx.author.id, message_time, member.id, guild.id,
# Execute the SQL Query's # Execute the SQL Query's
cur.execute(update_query, proposer) await cur.execute(update_query, proposer)
cur.execute(update_query, proposee) await cur.execute(update_query, proposee)
conn.commit() await conn.commit()
print(cur.rowcount, "2 people have been married!") print(cur.rowcount, "2 people have been married!")
# Congratulate them! # Congratulate them!
@ -173,8 +173,8 @@ class Relationship(commands.Cog):
val = ctx.author.id, guild.id, val = ctx.author.id, guild.id,
# Execute the SQL Query # Execute the SQL Query
cur.execute(select_query, val) await cur.execute(select_query, val)
result = cur.fetchone() result = await cur.fetchone()
married_user = result[1] married_user = result[1]
# Make sure that the user cannot divorce themselves # Make sure that the user cannot divorce themselves
@ -222,9 +222,9 @@ class Relationship(commands.Cog):
divorcee = member.id, guild.id, divorcee = member.id, guild.id,
# Execute the SQL Query's # Execute the SQL Query's
cur.execute(update_query, divorcer) await cur.execute(update_query, divorcer)
cur.execute(update_query, divorcee) await cur.execute(update_query, divorcee)
conn.commit() await conn.commit()
print(cur.rowcount, "2 Members have been divorced :(!") print(cur.rowcount, "2 Members have been divorced :(!")
# Congratulate them! # Congratulate them!
@ -277,8 +277,8 @@ class Relationship(commands.Cog):
val = member.id, guild.id, val = member.id, guild.id,
# Execute the SQL Query # Execute the SQL Query
cur.execute(select_query, val) await cur.execute(select_query, val)
result = cur.fetchone() result = await cur.fetchone()
user = result[1] user = result[1]
marriage_date = result[2] marriage_date = result[2]

Loading…
Cancel
Save