mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 05:06:56 +08:00
🔀 Merge pull request #503
Fix exception raised when constructing MessageChain from string
This commit is contained in:
commit
a6be0c370f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user