Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ApiResponse<T>(val status: ResponseStatus, val retcode: Int, val data: T? = null, val message: String? = null)

Generic API response envelope for OneBot actions.

Link copied to clipboard
@Serializable
data class BotSelf(val platform: String, val userId: String)

Bot identity included in events and status payloads.

Link copied to clipboard
@Serializable
data class BotStatus(val self: BotSelf, val online: Boolean)

Runtime status for one bot instance.

Link copied to clipboard
@Serializable
data class ChannelInfo(val channelId: String, val channelName: String? = null)

Channel metadata payload.

Link copied to clipboard
@Serializable
data class FileData(val fileId: String)

Reusable file reference data for media segments.

Link copied to clipboard
@Serializable
data class GroupInfo(val groupId: String, val groupName: String? = null)

Group metadata payload.

Link copied to clipboard
@Serializable
data class GroupMemberInfo(val groupId: String? = null, val userId: String, val userName: String? = null, val nickname: String? = null, val card: String? = null, val role: String? = null)

Group member metadata payload.

Link copied to clipboard
@Serializable
data class GuildInfo(val guildId: String, val guildName: String? = null)

Guild metadata payload.

Link copied to clipboard
@Serializable
data class GuildMemberInfo(val userId: String? = null, val userName: String? = null, val userDisplayName: String? = null, val nickname: String? = null)

Guild member metadata payload.

Link copied to clipboard
@Serializable
data class LocationData(val latitude: Double, val longitude: Double, val title: String, val content: String)

Data object for location segment.

Link copied to clipboard
@Serializable
data class MentionData(val userId: String)

Data object for mention segment.

Link copied to clipboard

OneBot action names used by typed wrappers and generic calls.

Link copied to clipboard
@Serializable(with = OneBotEventSerializer::class)
sealed class OneBotEvent

OneBot event hierarchy.

Link copied to clipboard
object OneBotEventSerializer : JsonContentPolymorphicSerializer<OneBotEvent>

Polymorphic deserializer for OneBotEvent keyed by type and detail_type.

Link copied to clipboard
@Serializable
data class ReplyData(val messageId: String, val userId: String? = null)

Data object for reply segment.

Link copied to clipboard
@Serializable
enum ResponseStatus : Enum<ResponseStatus>

Status field used by OneBot API envelopes.

Link copied to clipboard
@Serializable(with = SegmentSerializer::class)
sealed class Segment

Message segment hierarchy.

Link copied to clipboard
object SegmentSerializer : JsonContentPolymorphicSerializer<Segment>

Polymorphic deserializer for Segment keyed by type.

Link copied to clipboard
@Serializable
data class SelfInfo(val userId: String, val userName: String? = null, val platform: String? = null, val userDisplayName: String? = null)

Bot profile returned by get_self_info.

Link copied to clipboard
@Serializable
data class SendMessageRequest(val detailType: String, val userId: String? = null, val groupId: String? = null, val guildId: String? = null, val channelId: String? = null, val message: List<Segment>)

Unified send_message request payload.

Link copied to clipboard
@Serializable
data class SendMessageResult(val messageId: String, val time: Long)

Result payload returned by send_message.

Link copied to clipboard
@Serializable
data class StatusInfo(val good: Boolean, val bots: List<BotStatus>)

Aggregate runtime status reported by meta events.

Link copied to clipboard
@Serializable
data class TextData(val text: String)

Data object for text segment.

Link copied to clipboard
@Serializable
data class UserInfo(val userId: String, val userName: String? = null, val userDisplayName: String? = null, val userRemark: String? = null, val nickname: String? = null, val remark: String? = null)

User profile payload used by user/friend queries.

Link copied to clipboard
@Serializable
data class VersionInfo(val impl: String, val version: String, val oneBotVersion: String)

OneBot implementation version info.