Making it insert ignore instead of just insert

pull/8/head
sgoudham 4 years ago
parent 32f5355a0a
commit 5d67859ab4

@ -269,7 +269,7 @@ async def on_member_join(member):
with db.connection() as conn: with db.connection() as conn:
# Define the insert statement that will insert the user's information # Define the insert statement that will insert the user's information
insert_query = """INSERT INTO members (guildID, discordID) VALUES (?, ?)""" insert_query = """INSERT IGNORE INTO members (guildID, discordID) VALUES (?, ?)"""
vals = member.guild.id, member.id, vals = member.guild.id, member.id,
with closing(conn.cursor()) as cursor: with closing(conn.cursor()) as cursor:
# Execute the SQL Query # Execute the SQL Query

Loading…
Cancel
Save