Save the DB when writing to it

This commit is contained in:
Luke Murphy 2021-02-27 20:15:28 +01:00
parent a7a948cb68
commit cdb2ce8b04
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -142,6 +142,7 @@ class Logbot(Bot):
self.db[room]["messages"] = {} self.db[room]["messages"] = {}
if "title" not in self.db[room]: if "title" not in self.db[room]:
self.db[room]["title"] = room self.db[room]["title"] = room
self.db._dumps()
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):