From 72387440e4a5b213b76cc705e50628463e8ba7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98KimigaiiWuyi=E2=80=99?= <444835641@qq.com> Date: Thu, 23 Nov 2023 10:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E5=B0=9D=E8=AF=95=E6=94=AF?= =?UTF-8?q?=E6=8C=81`msg=5Fseq`=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GenshinUID/client.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/GenshinUID/client.py b/GenshinUID/client.py index b79f6f40..c2fbf5e3 100644 --- a/GenshinUID/client.py +++ b/GenshinUID/client.py @@ -825,7 +825,9 @@ async def group_send( assert isinstance(bot, qqbot) assert isinstance(target_id, str) - async def _send(content: Optional[str], image: Optional[str]): + async def _send( + content: Optional[str], image: Optional[str], msg_seq: int + ): message = Message() if image: if image.startswith('link://'): @@ -865,17 +867,19 @@ async def group_send( message=message, ) + msg_seq = 1 if node: for _msg in node: if _msg['type'] == 'image': image = _msg['data'] content = None - else: + elif _msg['type'] == 'text': image = None content = _msg['data'] - await _send(content, image) + await _send(content, image, msg_seq) + msg_seq += 1 else: - await _send(content, image) + await _send(content, image, msg_seq) async def ntchat_send(