From d2bb672f65a92a1c72ff1161acc5195a479d1cfb Mon Sep 17 00:00:00 2001 From: Snowykami <79104275+snowykami@users.noreply.github.com> Date: Thu, 9 May 2024 20:49:39 +0800 Subject: [PATCH] fix: main.py --- main.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 6914461..415d397 100644 --- a/main.py +++ b/main.py @@ -6,13 +6,12 @@ from liteyuki.utils.base.data_manager import StoredConfig, common_db from liteyuki.utils.base.ly_api import liteyuki_api init() +store_config: dict = common_db.first(StoredConfig(), default=StoredConfig()).config +static_config = load_from_yaml("config.yml") +store_config.update(static_config) +nonebot.init(**store_config) if __name__ == "__mp_main__": - store_config: dict = common_db.first(StoredConfig(), default=StoredConfig()).config - static_config = load_from_yaml("config.yml") - store_config.update(static_config) - nonebot.init(**store_config) - adapters = [v11.Adapter, v12.Adapter] driver = nonebot.get_driver() @@ -28,5 +27,4 @@ if __name__ == "__mp_main__": if __name__ == "__main__": from liteyuki.utils.base.reloader import Reloader - nonebot.run()