🐛 ensure message is not empty

This commit is contained in:
yanyongyu 2021-01-04 13:27:49 +08:00
parent 17960b2868
commit bc5391d711

View File

@ -82,6 +82,10 @@ def _check_at_me(bot: "Bot", event: "Event"):
if not isinstance(event, MessageEvent): if not isinstance(event, MessageEvent):
return return
# ensure message not empty
if not event.message:
event.message.append(MessageSegment.text(""))
if event.message_type == "private": if event.message_type == "private":
event.to_me = True event.to_me = True
else: else: