forked from swee/MeowNex
Update sweebot.py
This commit is contained in:
parent
dd3a93b2ef
commit
3dd7afc3b3
1 changed files with 3 additions and 2 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue