From 9241f4df79d94749c85595263fc6845c53a3cbb0 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Fri, 20 Nov 2020 01:07:24 +0800 Subject: [PATCH] :bug: fix remain space after reply --- nonebot/adapters/cqhttp/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nonebot/adapters/cqhttp/__init__.py b/nonebot/adapters/cqhttp/__init__.py index 5f2c8b09..92d118af 100644 --- a/nonebot/adapters/cqhttp/__init__.py +++ b/nonebot/adapters/cqhttp/__init__.py @@ -118,6 +118,9 @@ async def _check_reply(bot: "Bot", event: "Event"): del event.message[index] if len(event.message) > index and event.message[index].type == "at": del event.message[index] + if len(event.message) > index and event.message[index].type == "test": + event.message[index].data["text"] = event.message[index].data[ + "text"].strip() if not event.message: event.message.append(MessageSegment.text(""))