OnlineMessageSource
在线消息的 MessageSource. 拥有对象化的 sender, target, 也可以直接 recallMessage 和 quote
来源
当 bot 主动发送消息时, 产生 (由协议模块主动构造) OnlineMessageSource.Outgoing
当 bot 接收消息时, 产生 (由协议模块根据服务器的提供的信息构造) OnlineMessageSource.Incoming
机器人主动发送消息
当机器人 主动发出消息, 将会得到一个 消息回执. 此回执的 消息源 即为一个 外向消息源, 代表着刚刚发出的那条消息的来源.
机器人接受消息
当机器人接收一条消息 MessageEvent, 这条消息包含一个 内向消息源, 代表着接收到的这条消息的来源.
实现
此类的所有子类都有协议模块实现. 不要自行实现它们, 否则将无法发送
See also
Types
接收到的一条消息的 MessageSource
由 机器人主动发送消息 产生的 MessageSource, 可通过 MessageReceipt 获得.
Functions
判断内容是否与 another 相等.
判断内容是否与 another 相等即 this
与 another 的 contentToString 相等.
判断内容是否与 another 相等即 this
与 another 的 contentToString 相等. strict 为 true
时, 还会额外判断每个消息元素的类型, 顺序和属性. 如 Image 会判断 Image.imageId
转为最接近官方格式的字符串. 如 At(member) + "test"
将转为 "@群名片 test"
.
将 this
和 tail 连接.
Properties
用于判断是否为同一种元素的 MessageKey. 使用多态类型 MessageKey 最上层的 MessageKey.