🐛 修复一些细节小问题

This commit is contained in:
2024-10-20 20:59:30 +08:00
parent ef5866343d
commit 13b95c2732
14 changed files with 148 additions and 124 deletions

View File

@ -50,7 +50,7 @@ async def start_push_thread():
)
if MESSAGE in plugin_config.gotify_includes:
@on_message().handle()
@on_message(block=False, priority=100).handle()
async def _(event: Event):
ctx = Context(
user_id=event.get_user_id(),

View File

@ -12,6 +12,7 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
from croterline.process import get_ctx
from nonebot.adapters.onebot.v11 import MessageEvent
from nonebot.plugin import PluginMetadata
from nonebot.log import logger
from nonebot import on_message
__plugin_meta__ = PluginMetadata(
@ -20,11 +21,13 @@ __plugin_meta__ = PluginMetadata(
usage="用户无需使用",
)
ctx = get_ctx()
@on_message().handle()
@on_message(block=False, priority=100).handle()
async def _(event: MessageEvent):
print("Push message to Liteyuki")
logger.debug("Pushing message to Liteyuki")
ctx.sub_chan << event.raw_message
logger.debug("Pushed message to Liteyuki")