Skip to content

Commit

Permalink
修复导入错误
Browse files Browse the repository at this point in the history
  • Loading branch information
ssttkkl committed Jun 2, 2023
1 parent 9bd998f commit b0e201b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List

from nonebot.adapters.qqguild import Message, MessageSegment
from nonebot.internal.adapter import Message, MessageSegment


def split_message(message: Message, ignore_empty: bool = True) -> List[MessageSegment]:
Expand All @@ -9,9 +9,8 @@ def split_message(message: Message, ignore_empty: bool = True) -> List[MessageSe
if seg.type == "text":
for text in seg.data["text"].split(" "):
if not ignore_empty or text:
result.append(MessageSegment.text(text))
result.append(type(seg).text(text))
else:
result.append(seg)

return result

0 comments on commit b0e201b

Please sign in to comment.