Table of Contents

Class VoiceNextConnection

Namespace
DSharpPlus.VoiceNext
Assembly
DSharpPlus.VoiceNext.dll

VoiceNext connection to a voice channel.

public sealed class VoiceNextConnection
Inheritance
object
VoiceNextConnection

Properties

AudioFormat

Gets the audio format used by the Opus encoder.

IsPlaying

Gets whether this connection is still playing audio.

TargetChannel

Gets the channel this voice client is connected to.

UdpPing

Gets the UDP round-trip time in ms.

WebSocketPing

Gets the websocket round-trip time in ms.

Methods

Disconnect()

Disconnects and disposes this voice connection.

Dispose()

Disconnects and disposes this voice connection.

GetTransmitSink(int)

Gets a transmit stream for this connection, optionally specifying a packet size to use with the stream. If a stream is already configured, it will return the existing one.

Pause()

Pauses playback.

ResumeAsync()

Asynchronously resumes playback.

SendSpeakingAsync(bool)

Sends a speaking status to the connected voice channel.

WaitForPlaybackFinishAsync()

Asynchronously waits for playback to be finished. Playback is finished when speaking = false is signalled.

Events

UserJoined

Triggered whenever a user joins voice in the connected guild.

UserLeft

Triggered whenever a user leaves voice in the connected guild.

UserSpeaking

Triggered whenever a user speaks in the connected voice channel.

VoiceReceived

Triggered whenever voice data is received from the connected voice channel.

VoiceSocketErrored

Triggered whenever voice WebSocket throws an exception.