🐛 Fix exception raised when trying to construct message from plain

This commit is contained in:
Mix 2021-08-19 01:36:51 +08:00
parent 802c39da32
commit 22c7371f2e

View File

@ -295,8 +295,7 @@ class MessageChain(BaseMessage[MessageSegment]):
self, message: Union[List[Dict[str, Any]], Iterable[MessageSegment]]
) -> List[MessageSegment]:
if isinstance(message, str):
raise ValueError(
"String operation is not supported in mirai adapter")
return [MessageSegment.plain(text=message)]
return [
*map(
lambda x: x