From 235fa372521db4e57c4e96398af37d6b044a1ede Mon Sep 17 00:00:00 2001 From: profitroll Date: Mon, 14 Aug 2023 15:20:48 +0200 Subject: [PATCH] Small config reading fix --- modules/database.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/database.py b/modules/database.py index 57fcf4d..441f0c3 100644 --- a/modules/database.py +++ b/modules/database.py @@ -1,11 +1,9 @@ """Module that provides all database columns""" from async_pymongo import AsyncClient -from ujson import loads +from libbot import sync -with open("config.json", "r", encoding="utf-8") as f: - db_config = loads(f.read())["database"] - f.close() +db_config = sync.config_get("database") if db_config["user"] is not None and db_config["password"] is not None: con_string = "mongodb://{0}:{1}@{2}:{3}/{4}".format(