Segment

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

Message segment hierarchy.

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

Inheritors

Types

Link copied to clipboard
@Serializable
data class Audio(val type: String = "audio", val data: FileData) : Segment
Link copied to clipboard
object Companion
Link copied to clipboard
@Serializable
data class File(val type: String = "file", val data: FileData) : Segment
Link copied to clipboard
@Serializable
data class Image(val type: String = "image", val data: FileData) : Segment
Link copied to clipboard
@Serializable
data class Location(val type: String = "location", val data: LocationData) : Segment
Link copied to clipboard
@Serializable
data class Mention(val type: String = "mention", val data: MentionData) : Segment
Link copied to clipboard
@Serializable
data class MentionAll(val type: String = "mention_all", val data: JsonObject = JsonObject(emptyMap())) : 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
Link copied to clipboard
@Serializable
data class Video(val type: String = "video", val data: FileData) : Segment
Link copied to clipboard
@Serializable
data class Voice(val type: String = "voice", val data: FileData) : Segment

Properties

Link copied to clipboard
abstract val type: String