🐛 修复轻雪与NoneBot对接回复的错误

This commit is contained in:
远野千束 2024-08-22 10:10:03 +08:00
parent 4bf8512a7d
commit aa2d182840

View File

@ -41,4 +41,7 @@ async def _(bot: Bot, event: MessageEvent):
@shared_memory.on_subscriber_receive("event_to_nonebot") @shared_memory.on_subscriber_receive("event_to_nonebot")
async def _(event: LiteyukiMessageEvent): async def _(event: LiteyukiMessageEvent):
bot: Bot = get_bot(event.bot_id) bot: Bot = get_bot(event.bot_id)
await bot.send_msg(message_type=event.message_type, user_id=int(event.session_id), group_id=int(event.session_id), message=event.data["message"]) if event.message_type == "private":
await bot.send_private_msg(user_id=int(event.session_id), message=event.data["message"])
elif event.message_type == "group":
await bot.send_group_msg(group_id=int(event.session_id), message=event.data["message"])