OneBotMessageContent

interface OneBotMessageContent : MessageContent(source)

事件中接收到的消息内容。

Author

ForteScarlet

Properties

Link copied to clipboard
abstract override val id: ID

消息的ID

Link copied to clipboard
abstract override val messages: Messages

接收到的所有消息元素。 OneBot中,接收到的元素大概率都会是 OneBotMessageElement, 其中大部分内容大概率都是 OneBotMessageSegmentElement

Link copied to clipboard
abstract override val plainText: String?

消息中所有的 文本消息 (或者说 sourceSegments 中所有的 OneBotText) 的合并结果。

Link copied to clipboard

接收到的消息事件中的原始消息元素列表。

Functions

Link copied to clipboard
abstract suspend override fun delete(vararg options: DeleteOption)

删除此消息。

Link copied to clipboard
open suspend override fun reference(): OneBotReply?

寻找 messages 中第一个 OneBotReply 类型的元素, 如果没有则得到 null。 寻找的过程是即时的,不会发生挂起。

Link copied to clipboard
abstract suspend override fun referenceMessage(): OneBotMessageContent?

根据 消息引用 信息通过API查询对应引用的消息内容。