diff --git a/sweebot.py b/sweebot.py index cb1ac92..1edaf91 100644 --- a/sweebot.py +++ b/sweebot.py @@ -16,7 +16,7 @@ class config: self.database = self.conn.cursor() def perms(self, cloak: str): try: - self.database.execute(f"SELECT * FROM users WHERE username = ?;", (cloak)) + self.database.execute(f"SELECT * FROM users WHERE username = ?;", [cloak]) output = self.database.fetchall() return output[0][1] except: @@ -24,7 +24,7 @@ class config: return '' def chansettings(self, chan: str): try: - self.database.execute("SELECT * FROM chans WHERE chan = ?;", (chan)) + self.database.execute("SELECT * FROM chans WHERE chan = ?;", [chan]) output = self.database.fetchall() temp = output[0][1].split(",") return temp if temp != [''] else [] @@ -35,9 +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("INSERT INTO chans (chan, flags) values(?, '+config');", [chan]) flag = self.chansettings(chan) + flags - self.database.execute("UPDATE chans SET FLAGS = ? WHERE chan = ?", (",".join(flag),chan)) + self.database.execute("UPDATE chans SET FLAGS = ? WHERE chan = ?", [",".join(flag),chan]) except: print(traceback.format_exc())