mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 05:16:48 +08:00
🔀 Merge pull request #19
This commit is contained in:
commit
b80f0bf202
@ -344,4 +344,5 @@ class BaseMessage(list, abc.ABC):
|
||||
def _concat(x: str, y: BaseMessageSegment) -> str:
|
||||
return f"{x} {y.data['text']}" if y.type == "text" else x
|
||||
|
||||
return reduce(_concat, self, "")
|
||||
plain_text = reduce(_concat, self, "")
|
||||
return plain_text[1:] if plain_text else plain_text
|
||||
|
Loading…
Reference in New Issue
Block a user