🚑 fix not delete empty text

This commit is contained in:
yanyongyu 2020-11-20 12:53:31 +08:00 committed by pull[bot]
parent 5fb9799807
commit e5213eb95a

View File

@ -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(""))