VoiceConnection
A VoiceConnection is an adapter that forms the concept of a voice connection, or a connection between you and Discord voice servers.
Parameters
gateway
the Gateway that handles events for the guild this VoiceConnection represents.
voiceGateway
the underlying VoiceGateway for this voice connection.
data
the data representing this VoiceConnection.
voiceGatewayConfiguration
the configuration used on each new connect for the voiceGateway.
audioProvider
a AudioProvider that will provide AudioFrame when required.
frameInterceptor
a FrameInterceptor that will intercept all outgoing AudioFrames.
frameSender
the AudioFrameSender that will handle the sending of audio packets.
Constructors
Link copied to clipboard
constructor(data: VoiceConnectionData, gateway: Gateway, voiceGateway: VoiceGateway, socket: VoiceUdpSocket, voiceGatewayConfiguration: VoiceGatewayConfiguration, streams: Streams, audioProvider: AudioProvider, frameInterceptor: FrameInterceptor, frameSender: AudioFrameSender, nonceStrategy: NonceStrategy, connectionDetachDuration: Duration)
constructor(data: VoiceConnectionData, gateway: Gateway, voiceGateway: VoiceGateway, socket: VoiceUdpSocket, voiceGatewayConfiguration: VoiceGatewayConfiguration, streams: Streams, audioProvider: AudioProvider, frameInterceptor: FrameInterceptor, frameSender: AudioFrameSender, connectionDetachDuration: Duration)
Properties
Functions
Link copied to clipboard
Starts the VoiceGateway for this VoiceConnection. This will begin the process for audio transmission.
Link copied to clipboard
Disconnects from the voice servers, does not change the voice state.