Segment

@Serializable(with = SegmentSerializer::class)
sealed class Segment

OneBot V11 message segment hierarchy.

Unknown segment types are preserved as Segment.Unknown for forward compatibility.

Inheritors

Types

Link copied to clipboard
@Serializable
data class At(val type: String = "at", val data: AtData) : Segment
Link copied to clipboard
object Companion
Link copied to clipboard
@Serializable
data class Image(val type: String = "image", val data: ImageData) : Segment
Link copied to clipboard
@Serializable
data class Reply(val type: String = "reply", val data: ReplyData) : Segment
Link copied to clipboard
@Serializable
data class Text(val type: String = "text", val data: TextData) : Segment
Link copied to clipboard
@Serializable
data class Unknown(val type: String, val data: JsonObject = JsonObject(emptyMap())) : Segment

Properties

Link copied to clipboard
abstract val type: String