mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-11 04:07:23 +08:00
🚸 添加发布工作流
This commit is contained in:
parent
8ba50b7bd6
commit
1b24157f08
@ -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)
|
||||
|
@ -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] = {}
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user