Browse Source

Try to fill out entire dictionary contents

Covers edge cases where the state is improperly setup.
master
Luke Murphy 4 years ago
parent
commit
0a3ed438af
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 4
      LogBot/logbot.py

4
LogBot/logbot.py

@ -138,9 +138,11 @@ class Logbot(Bot):
if room not in self.db.keys():
self.db[room] = {}
if "messages" not in self.db[room]:
self.db[room]["messages"] = {}
if "title" not in self.db[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):
os.mkdir(room_path)

Loading…
Cancel
Save