ServiceMessage
服务消息, 可以是 JSON 消息或 XML 消息.
XML 消息有时候是 SimpleServiceMessage, 有时候是 LightApp. JSON 消息更多情况下通过 LightApp 发送.
建议使用官方客户端发送来确定具体是哪种类型.
See also
Types
Key
Link copied to clipboard
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
注意: 富文本消息的 RichMessage.contentEquals 和 RichMessage.toString 都不稳定. 将来可能在没有任何警告的情况下改变格式.
followedBy
Link copied to clipboard
将 this
和 tail 连接.
serializeToMiraiCode
Link copied to clipboard
转换为 mirai 码.