CodableMessage
可以使用 mirai 码表示的 Message 类型.
从字符串解析 mirai 码:MiraiCode.deserializeMiraiCode
不适合第三方实现
即使自定义消息类型实现了接口 CodableMessage, 在 MiraiCode.deserializeMiraiCode 时也无法解析消息类型. 因此实现没有意义.
See also
Functions
appendMiraiCodeTo
Link copied to clipboard
contentEquals
Link copied to clipboard
open fun contentEquals(another: String, ignoreCase: Boolean = false): Boolean
Content copied to clipboard
判断内容是否与 another 相等.
open fun contentEquals(another: Message, ignoreCase: Boolean = false): Boolean
Content copied to clipboard
判断内容是否与 another 相等即 this
与 another 的 contentToString 相等.
open fun contentEquals(another: Message, ignoreCase: Boolean = false, strict: Boolean = false): Boolean
Content copied to clipboard
判断内容是否与 another 相等即 this
与 another 的 contentToString 相等. strict 为 true
时, 还会额外判断每个消息元素的类型, 顺序和属性. 如 Image 会判断 Image.imageId
contentToString
Link copied to clipboard
转为最接近官方格式的字符串. 如 At(member) + "test"
将转为 "@群名片 test"
.
followedBy
Link copied to clipboard
将 this
和 tail 连接.
serializeToMiraiCode
Link copied to clipboard
转换为 mirai 码.
Inheritors
At
Link copied to clipboard
AtAll
Link copied to clipboard
Dice
Link copied to clipboard
Face
Link copied to clipboard
FlashImage
Link copied to clipboard
Image
Link copied to clipboard
MessageChain
Link copied to clipboard
MusicShare
Link copied to clipboard
PlainText
Link copied to clipboard
PokeMessage
Link copied to clipboard
LightApp
Link copied to clipboard
ServiceMessage
Link copied to clipboard
VipFace
Link copied to clipboard
Extensions
serializeToMiraiCode
Link copied to clipboard
转换得到 mirai 码.