OfflineMessageSource
由一条消息中的 QuoteReply 得到的, 或通过 MessageSourceBuilder 手动构建的 MessageSource.
此消息源可能来自一条与机器人无关的消息, 因此缺少相关发送环境信息, 无法提供 sender
或 target
对象的获取.
要获得 OfflineMessageSource, 使用 MessageSourceBuilder. 或通过 OnlineMessageSource.toOffline 转换得到 (一般没有必要).
Constructors
OfflineMessageSource
Link copied to clipboard
Types
Key
Link copied to clipboard
object Key : AbstractPolymorphicMessageKey<MessageSource, OfflineMessageSource>
Content copied to clipboard
Functions
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 连接.
Properties
internalIds
Link copied to clipboard
key
Link copied to clipboard
用于判断是否为同一种元素的 MessageKey. 使用多态类型 MessageKey 最上层的 MessageKey.
kind
Link copied to clipboard
originalMessage
Link copied to clipboard