From 3dd7afc3b37477667bd923d359c0f7afdc45ba10 Mon Sep 17 00:00:00 2001 From: Swee Date: Sat, 12 Oct 2024 14:53:38 -0700 Subject: [PATCH] Update sweebot.py --- sweebot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sweebot.py b/sweebot.py index 3b2bd10..99a37df 100644 --- a/sweebot.py +++ b/sweebot.py @@ -35,8 +35,9 @@ class config: try: if self.chansettings(chan) == []: print("[!!!] Channel doesn't exist in config") - self.database.execute("INSERT INTO chans (chan, flags) values(?, '+config');", [chan]) - self.database.execute("UPDATE chans SET FLAGS = ? WHERE chan = ?", [",".join(flags),chan]) + self.database.execute("INSERT INTO chans (chan, flags) values(?, ?);", [chan, ["+config"] + ",".join(flags)]) + else: + self.database.execute("UPDATE chans SET FLAGS = ? WHERE chan = ?", [",".join(flags),chan]) self.conn.commit() except: print(traceback.format_exc())