From 44cae95745a491467b75f13d36c4cc8a4bb39932 Mon Sep 17 00:00:00 2001 From: KimigaiiWuyi <444835641@qq.com> Date: Sat, 11 Nov 2023 03:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BC=98=E5=8C=96=E5=8F=91?= =?UTF-8?q?=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gsuid_core/bot.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gsuid_core/bot.py b/gsuid_core/bot.py index bd212b6..6531096 100644 --- a/gsuid_core/bot.py +++ b/gsuid_core/bot.py @@ -33,6 +33,7 @@ class _Bot: msg_id: str = '', at_sender: bool = False, sender_id: str = '', + group_id: Optional[str] = None, ): _message = await convert_message(message) @@ -42,16 +43,14 @@ class _Bot: if at_sender and sender_id: _message.append(MessageSegment.at(sender_id)) - send_message = [] - for _m in _message: - if _m.type not in ['image_size']: - send_message.append(_m) + if group_id: + _message.append(Message('group', group_id)) if is_specific_msg_id and not msg_id: msg_id = specific_msg_id send = MessageSend( - content=send_message, + content=_message, bot_id=bot_id, bot_self_id=bot_self_id, target_type=target_type, @@ -236,6 +235,7 @@ class Bot: self.ev.msg_id, at_sender, self.ev.user_id, + self.ev.group_id, ) async def target_send( @@ -245,6 +245,7 @@ class Bot: target_id: Optional[str], at_sender: bool = False, sender_id: str = '', + send_source_group: Optional[str] = None, ): return await self.bot.target_send( message, @@ -255,4 +256,5 @@ class Bot: self.ev.msg_id, at_sender, sender_id, + send_source_group, )