v0.3.6 Release Note
修复
message.accept()
和message.reject()
处理错误
新增
- 在
Mirai.MessageComponent
新增serialize
和deserialized
工具方法, 用于序列化和反序列化messageChain
const { serialize, deserialize } = Mirai.MessageComponent;
const serialized = serialize(message.messageChain);
// 文字123[mirai:at:12345]文字234[mirai:image:{abcd}.png]文字345
const deserialized = deserialize(serialized);
//[{ type: 'Plain', text: '文字123' }, { type: 'At', target: 12345, display: '' }, ...]