Table of Contents

Class LavalinkGuildConnection

Namespace
DSharpPlus.Lavalink
Assembly
DSharpPlus.Lavalink.dll

Represents a Lavalink connection to a channel.

[Obsolete("DSharpPlus.Lavalink is deprecated for removal.", true)]
public sealed class LavalinkGuildConnection
Inheritance
LavalinkGuildConnection

Properties

Channel

Gets the voice channel associated with this connection.

CurrentState

Gets the current player state.

Guild

Gets the guild associated with this connection.

IsConnected

Gets whether this channel is still connected.

Node

Gets the Lavalink node associated with this connection.

Methods

AdjustEqualizerAsync(params LavalinkBandAdjustment[])

Adjusts the specified bands in the audio equalizer. This will alter the sound output, and might incur a lot of CPU usage.

DisconnectAsync(bool)

Disconnects the connection from the voice channel.

GetTracksAsync(FileInfo)

Loads tracks from a local file.

GetTracksAsync(string, LavalinkSearchType)

Searches for specified terms.

GetTracksAsync(Uri)

Loads tracks from specified URL.

PauseAsync()

Pauses the player.

PlayAsync(LavalinkTrack)

Queues the specified track for playback.

PlayPartialAsync(LavalinkTrack, TimeSpan, TimeSpan)

Queues the specified track for playback. The track will be played from specified start timestamp to specified end timestamp.

ResetEqualizerAsync()

Resets the audio equalizer to default values.

ResumeAsync()

Resumes playback.

SeekAsync(TimeSpan)

Seeks the current track to specified position.

SetVolumeAsync(int)

Sets the playback volume. This might incur a lot of CPU usage.

StopAsync()

Stops the player completely.

Events

DiscordWebSocketClosed

Triggered whenever Discord Voice WebSocket connection is terminated.

PlaybackFinished

Triggered whenever playback of a track finishes.

PlaybackStarted

Triggered whenever playback of a track starts.

This is only available for version 3.3.1 and greater.

PlayerUpdated

Triggered whenever Lavalink updates player status.

TrackException

Triggered whenever playback of a track encounters an error.

TrackStuck

Triggered whenever playback of a track gets stuck.