forked from bot/app
🐛 fix: Channel的接收者过滤器的问题,优化重启部分
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
import threading
|
||||
|
||||
from nonebot import logger
|
||||
from liteyuki.core.spawn_process import chan_in_spawn
|
||||
|
||||
|
||||
def reload(delay: float = 0.0, receiver: str = "nonebot"):
|
||||
"""
|
||||
重载LiteyukiBot(nonebot)
|
||||
Args:
|
||||
receiver: 指定重载的进程
|
||||
delay:
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
|
||||
chan_in_spawn.send(1, receiver)
|
||||
logger.info(f"Reloading LiteyukiBot({receiver})...")
|
||||
|
Reference in New Issue
Block a user