1
0
forked from bot/app

新增observer类和开发调试器

This commit is contained in:
2024-08-12 05:26:36 +08:00
parent 02cf058552
commit 8568c7bb99
12 changed files with 153 additions and 38 deletions

View File

@ -9,7 +9,7 @@ from typing import Callable, TypeAlias
from watchdog.events import FileSystemEvent, FileSystemEventHandler
from watchdog.observers import Observer
from liteyuki import get_bot, get_config, logger
from liteyuki import get_bot, get_config_with_compat, logger
liteyuki_bot = get_bot()
@ -37,7 +37,7 @@ def debounce(wait):
return decorator
if get_config("dev_mode", False):
if get_config_with_compat("liteyuki.dev_mode", ("dev_mode",), False):
logger.debug("Liteyuki Reload enabled, watching for file changes...")
observer.start()