From abbb9178b81371ac96b5182cbefb1fdf066bc675 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sat, 25 Jul 2020 18:54:23 +0100 Subject: [PATCH] Changing from insert to update statement --- cogs/moderation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cogs/moderation.py b/cogs/moderation.py index d3cb49bb..8c1c58ee 100644 --- a/cogs/moderation.py +++ b/cogs/moderation.py @@ -90,11 +90,11 @@ class Moderation(commands.Cog): # Checking if the guild already exists within the database with db.connection() as conn: # Get the author's row from the Members Table - insert_query = """INSERT INTO guilds (modlogs) VALUES (?)""" - val = channelID, + update_query = """UPDATE guilds SET modlogs = (?) WHERE guildID = (?)""" + val = channelID, ctx.author.guild.id with closing(conn.cursor()) as cursor: # Execute the SQL Query - cursor.execute(insert_query, val) + cursor.execute(update_query, val) await ctx.send("Your **Modlogs Channel** is now successfully set up!" + f"\nPlease refer to **{ctx.prefix}help** for any information")