From aa2d182840298193780765440c75850206d2d8cb Mon Sep 17 00:00:00 2001 From: snowy Date: Thu, 22 Aug 2024 10:10:03 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E8=BD=BB=E9=9B=AA?= =?UTF-8?q?=E4=B8=8ENoneBot=E5=AF=B9=E6=8E=A5=E5=9B=9E=E5=A4=8D=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/nonebot_plugins/to_liteyuki.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nonebot_plugins/to_liteyuki.py b/src/nonebot_plugins/to_liteyuki.py index cba15f22..f8410385 100644 --- a/src/nonebot_plugins/to_liteyuki.py +++ b/src/nonebot_plugins/to_liteyuki.py @@ -41,4 +41,7 @@ async def _(bot: Bot, event: MessageEvent): @shared_memory.on_subscriber_receive("event_to_nonebot") async def _(event: LiteyukiMessageEvent): 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"])