VoiceGateway
An implementation of the Discord Gateway (see gateway-only, not UDP connection in docs) and its lifecycle.
Allows consumers to receive VoiceEvents through events and send Commands through send.
Inheritors
Properties
Link copied to clipboard
The incoming VoiceEvents of the Gateway. Users should expect kotlinx.coroutines.flow.Flows to be hot and remain open for the entire lifecycle of the Gateway.
Link copied to clipboard
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.
Link copied to clipboard
Starts a reconnection voice gateway connection with the given configuration. This function will suspend until the lifecycle of the gateway has ended.