From 5d67859ab4113606e9a56469fb287cb5f853121c Mon Sep 17 00:00:00 2001 From: sgoudham Date: Mon, 27 Jul 2020 06:44:26 +0100 Subject: [PATCH] Making it insert ignore instead of just insert --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 12e8f210..f7f3e37b 100644 --- a/main.py +++ b/main.py @@ -269,7 +269,7 @@ async def on_member_join(member): with db.connection() as conn: # 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, with closing(conn.cursor()) as cursor: # Execute the SQL Query