Package-level declarations

Types

Link copied to clipboard
sealed class Close : VoiceEvent
Link copied to clipboard
sealed class Command
Link copied to clipboard

The default Voice Gateway implementation of Kord, using an HttpClient for the underlying websocket.

Link copied to clipboard
class DefaultVoiceGatewayBuilder(val selfId: Snowflake, val guildId: Snowflake, val sessionId: String)
Link copied to clipboard
data class DefaultVoiceGatewayData(val selfId: Snowflake, val guildId: Snowflake, val sessionId: String, val client: HttpClient, val reconnectRetry: Retry, val eventFlow: MutableSharedFlow<VoiceEvent>)
Link copied to clipboard
data class Heartbeat(val nonce: Long) : Command
Link copied to clipboard
data class HeartbeatAck(val nonce: Long) : VoiceEvent
Link copied to clipboard
data class Hello(val version: Short, val heartbeatInterval: Double) : VoiceEvent
Link copied to clipboard
data class Identify(val serverId: Snowflake, val userId: Snowflake, val sessionId: String, val token: String) : Command
Link copied to clipboard
enum OpCode : Enum<OpCode>
Link copied to clipboard
data class Ready(val ssrc: UInt, val ip: String, val port: Int, val modes: List<EncryptionMode>) : VoiceEvent
Link copied to clipboard
data class Resume(val serverId: Snowflake, val sessionId: String, val token: String) : Command
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class SendSpeaking(val speaking: SpeakingFlags, val delay: Int, val ssrc: UInt) : Command
Link copied to clipboard
data class SessionDescription(val mode: EncryptionMode, val secretKey: List<UByte>) : VoiceEvent
Link copied to clipboard
data class Speaking(val userId: Snowflake, val ssrc: UInt, val speaking: SpeakingFlags) : VoiceEvent
Link copied to clipboard
sealed class VoiceEvent
Link copied to clipboard

An implementation of the Discord Gateway (see gateway-only, not UDP connection in docs) and its lifecycle.

Link copied to clipboard

Representation of Discord's Voice Gateway close codes.

Link copied to clipboard
data class VoiceGatewayConfiguration(val token: String, val endpoint: String)

Functions

Link copied to clipboard
inline fun <T : VoiceEvent> VoiceGateway.on(scope: CoroutineScope = this.scope, crossinline consumer: suspend T.() -> Unit): Job

Convenience method that will invoke the consumer on every event T created by VoiceGateway.events.