Package-level declarations

Types

Link copied to clipboard

OneBotMessageSegmentElement 的普通默认实现。

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

OneBot11的 消息段 类型定义。 其中,消息段的类型 type 由多态序列化类型名决定,而 data 的类型则由实现者决定。

Link copied to clipboard
Link copied to clipboard

OneBotMessageSegment 类型的实现类实现, 表示它可以将自己转化为一个独特的 OneBotMessageSegmentElement 类型,例如某个实现了 MentionMessageOneBotMessageSegmentElement 实例。

Link copied to clipboard

可用于便捷地直接对一个 OneBotMessageSegment 列表进行序列化地序列化器。

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "reply")
class OneBotReply : OneBotMessageSegment, MessageReference
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@FragileSimbotAPI
data class OneBotUnknownSegment @InternalOneBotAPI constructor(val type: String, val data: JsonElement? = null) : OneBotMessageSegment

一个未知类型的 OneBotMessageSegment

Link copied to clipboard
Link copied to clipboard

Inherited functions

Link copied to clipboard
fun MessagesBuilder.add(segment: OneBotMessageSegment): MessagesBuilder

MessagesBuilder 中直接添加一个 OneBotMessageSegment

Link copied to clipboard
inline fun OneBotImage.Factory.create(resource: Resource, block: OneBotImage.AdditionalParams.() -> Unit): OneBotImage

使用 Resource 构建一个用于发送OneBotImage

Link copied to clipboard
inline fun <T : OneBotMessageSegment> Message.Element.isOneBotSegment(): Boolean

判断 this 的类型是 OneBotMessageSegmentElement 并且 segment 的类型是 T

Link copied to clipboard
inline fun <T : OneBotMessageSegment> Message.Element.oneBotSegment(): T

如果this 的类型是 OneBotMessageSegmentElement 并且 segment,则获取到对应的 T 结果, 否则抛出 ClassCastException

Link copied to clipboard
inline fun <T : OneBotMessageSegment> Message.Element.oneBotSegmentOrNull(): T?

如果this 的类型是 OneBotMessageSegmentElement 并且 segment,则获取到对应的 T 结果, 否则得到 null

Link copied to clipboard

OneBotMessageSegment 转化或包装为 OneBotMessageSegmentElement。 这并不是在收到消息时用于转换类型的直接方法, 而是 OneBotMessageSegment.resolveToMessageElement —— 后者会将一些与标准消息元素无差别的类型直接转为标准消息类型, 例如将 OneBotAt 转为 AtAtAllOneBotFace 转为 Face