diff --git a/liteyuki/bot/__init__.py b/liteyuki/bot/__init__.py index 94bad37d..49d29c89 100644 --- a/liteyuki/bot/__init__.py +++ b/liteyuki/bot/__init__.py @@ -5,11 +5,11 @@ import sys import threading import time from typing import Any, Optional -from watchdog.observers import Observer + from watchdog.events import FileSystemEventHandler +from watchdog.observers import Observer from liteyuki.bot.lifespan import (LIFESPAN_FUNC, Lifespan) -from liteyuki.comm.channel import Channel, set_channel from liteyuki.core import IS_MAIN_PROCESS from liteyuki.core.manager import ProcessManager from liteyuki.core.spawn_process import mb_run, nb_run @@ -68,8 +68,6 @@ $$$$$$$$/ $$$$$$/ $$/ $$$$$$$$/ $$/ $$$$$$/ $$/ $$/ $$$$$$/ def start_watcher(self): if self.config.get("debug", False): - code_directories = {} - src_directories = ( "liteyuki", "src/liteyuki_main", diff --git a/src/utils/__init__.py b/src/utils/__init__.py index b69bae9b..83d44906 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -13,7 +13,6 @@ import requests from src.utils.base.config import load_from_yaml, config from src.utils.base.log import init_log -from src.utils.base.data_manager import TempConfig, common_db from git import Repo @@ -64,9 +63,9 @@ def init(): except Exception as e: nonebot.logger.error(f"Failed to load git repository: {e}, please clone this project from GitHub instead of downloading the zip file.") - temp_data: TempConfig = common_db.where_one(TempConfig(), default=TempConfig()) - temp_data.data["start_time"] = time.time() - common_db.save(temp_data) + # temp_data: TempConfig = common_db.where_one(TempConfig(), default=TempConfig()) + # temp_data.data["start_time"] = time.time() + # common_db.save(temp_data) # 在加载完成语言后再初始化日志 nonebot.logger.info("Liteyuki is initializing...") diff --git a/src/utils/base/data_manager.py b/src/utils/base/data_manager.py index 80670aa6..c4176020 100644 --- a/src/utils/base/data_manager.py +++ b/src/utils/base/data_manager.py @@ -5,7 +5,6 @@ from pydantic import Field from .data import Database, LiteModel, Database DATA_PATH = "data/liteyuki" - user_db: Database = Database(os.path.join(DATA_PATH, "users.ldb")) group_db: Database = Database(os.path.join(DATA_PATH, "groups.ldb")) plugin_db: Database = Database(os.path.join(DATA_PATH, "plugins.ldb"))