🚸 添加发布工作流

This commit is contained in:
远野千束 2024-08-18 04:37:58 +08:00
parent 8ba50b7bd6
commit 1b24157f08
3 changed files with 5 additions and 6 deletions

View File

@ -12,7 +12,7 @@ from liteyuki.bot.lifespan import (LIFESPAN_FUNC, Lifespan)
from liteyuki.comm.channel import get_channel
from liteyuki.core.manager import ProcessManager
from liteyuki.log import init_log, logger
from liteyuki.plugin import load_plugins
from liteyuki.plugin import load_plugin
from liteyuki.utils import IS_MAIN_PROCESS
__all__ = [
@ -54,8 +54,8 @@ class LiteyukiBot:
self.stop_event = threading.Event()
self.call_restart_count = 0
"""插件加载"""
load_plugins("liteyuki/plugins") # 加载轻雪插件
"""加载插件加载"""
load_plugin("liteyuki.plugins.plugin_loader") # 加载轻雪插件
"""信号处理"""
signal.signal(signal.SIGINT, self._handle_exit)

View File

@ -16,7 +16,7 @@ from typing import Optional
from liteyuki.log import logger
from liteyuki.plugin.model import Plugin, PluginMetadata
from importlib import import_module
from nonebot import load_builtin_plugin
from liteyuki.utils import path_to_module_name
_plugins: dict[str, Plugin] = {}

View File

@ -21,11 +21,10 @@ def default_plugins_loader():
"""
默认插件加载器应在初始化时调用
"""
load_plugins("src/liteyuki_plugins")
for plugin in get_config("liteyuki.plugins", []):
load_plugin(plugin)
for plugin_dir in get_config("liteyuki.plugin_dirs", []):
for plugin_dir in get_config("liteyuki.plugin_dirs", ["src/liteyuki_plugins"]):
load_plugins(plugin_dir)