mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-01 01:25:07 +08:00
🚑 fix not delete empty text
This commit is contained in:
parent
5fb9799807
commit
e5213eb95a
@ -120,7 +120,9 @@ async def _check_reply(bot: "Bot", event: "Event"):
|
||||
del event.message[index]
|
||||
if len(event.message) > index and event.message[index].type == "text":
|
||||
event.message[index].data["text"] = event.message[index].data[
|
||||
"text"].strip()
|
||||
"text"].lstrip()
|
||||
if not event.message[index].data["text"]:
|
||||
del event.message[index]
|
||||
if not event.message:
|
||||
event.message.append(MessageSegment.text(""))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user