mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-20 09:38:23 +08:00
🐛 Fix exception raised when trying to construct message from plain
This commit is contained in:
parent
802c39da32
commit
22c7371f2e
@ -295,8 +295,7 @@ class MessageChain(BaseMessage[MessageSegment]):
|
|||||||
self, message: Union[List[Dict[str, Any]], Iterable[MessageSegment]]
|
self, message: Union[List[Dict[str, Any]], Iterable[MessageSegment]]
|
||||||
) -> List[MessageSegment]:
|
) -> List[MessageSegment]:
|
||||||
if isinstance(message, str):
|
if isinstance(message, str):
|
||||||
raise ValueError(
|
return [MessageSegment.plain(text=message)]
|
||||||
"String operation is not supported in mirai adapter")
|
|
||||||
return [
|
return [
|
||||||
*map(
|
*map(
|
||||||
lambda x: x
|
lambda x: x
|
||||||
|
Loading…
x
Reference in New Issue
Block a user