⚡ 添加进程及生命周期管理器,添加轻雪框架支持
This commit is contained in:
@ -4,6 +4,7 @@ from typing import Any, Coroutine, Optional
|
||||
|
||||
import nonebot
|
||||
|
||||
import liteyuki
|
||||
from liteyuki.plugin.load import load_plugin, load_plugins
|
||||
from src.utils import (
|
||||
adapter_manager,
|
||||
@ -50,7 +51,6 @@ $$$$$$$$/ $$$$$$/ $$/ $$$$$$$$/ $$/ $$$$$$/ $$/ $$/ $$$$$$/
|
||||
""" + "\033[0m")
|
||||
|
||||
def run(self, *args, **kwargs):
|
||||
|
||||
if _MAIN_PROCESS:
|
||||
load_plugins("liteyuki/plugins")
|
||||
asyncio.run(self.lifespan.before_start())
|
||||
@ -177,9 +177,6 @@ $$$$$$$$/ $$$$$$/ $$/ $$$$$$$$/ $$/ $$$$$$/ $$/ $$/ $$$$$$/
|
||||
def init_config(self):
|
||||
pass
|
||||
|
||||
def register_adapters(self, *args):
|
||||
pass
|
||||
|
||||
def on_before_start(self, func: LIFESPAN_FUNC):
|
||||
"""
|
||||
注册启动前的函数
|
||||
|
Reference in New Issue
Block a user