mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 09:05:04 +08:00
🐛 ensure message is not empty
This commit is contained in:
parent
17960b2868
commit
bc5391d711
@ -82,6 +82,10 @@ def _check_at_me(bot: "Bot", event: "Event"):
|
||||
if not isinstance(event, MessageEvent):
|
||||
return
|
||||
|
||||
# ensure message not empty
|
||||
if not event.message:
|
||||
event.message.append(MessageSegment.text(""))
|
||||
|
||||
if event.message_type == "private":
|
||||
event.to_me = True
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user