Browse Source
Try to fill out entire dictionary contents
Covers edge cases where the state is improperly setup.
master
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with
3 additions and
1 deletions
-
LogBot/logbot.py
|
@ -138,9 +138,11 @@ class Logbot(Bot): |
|
|
|
|
|
|
|
|
if room not in self.db.keys(): |
|
|
if room not in self.db.keys(): |
|
|
self.db[room] = {} |
|
|
self.db[room] = {} |
|
|
|
|
|
if "messages" not in self.db[room]: |
|
|
self.db[room]["messages"] = {} |
|
|
self.db[room]["messages"] = {} |
|
|
|
|
|
if "title" not in self.db[room]: |
|
|
self.db[room]["title"] = room |
|
|
self.db[room]["title"] = room |
|
|
self.log.info(f"Added to the database: { room }") |
|
|
self.log.info(f"Added to the database: { room }") |
|
|
|
|
|
|
|
|
if not os.path.exists(room_path): |
|
|
if not os.path.exists(room_path): |
|
|
os.mkdir(room_path) |
|
|
os.mkdir(room_path) |
|
|