Table of Contents

Class LavalinkConfiguration

Namespace
DisCatSharp.Lavalink
Assembly
DisCatSharp.Lavalink.dll

Lavalink connection configuration.

public sealed class LavalinkConfiguration
Inheritance
LavalinkConfiguration
Inherited Members

Constructors

LavalinkConfiguration()

Creates a new instance of LavalinkConfiguration.

LavalinkConfiguration(LavalinkConfiguration)

Creates a new instance of LavalinkConfiguration, copying the properties of another configuration.

Properties

DefaultVolume

Sets the default volume level players will be created with.

Defaults to 70 percent.

Min 0, max 1000.

EnableBuiltInQueueSystem

Sets whether the built in queue system should be used.

Defaults to false.

EnableTrace

Sets whether trace should be enabled for more detailed error responses.

Defaults to false.

HttpTimeout

Sets the timeout for HTTP requests.

Set to InfiniteTimeSpan to disable timeouts.

Defaults to 20 seconds.

Password

Sets the password for the Lavalink connection.

Defaults to youshallnotpass.

Proxy

Sets the proxy to use for HTTP and WebSocket connections to Lavalink.

Defaults to null.

QueueEntry

Gets a new instance of a queue entry object. The type of the object is determined by the QueueEntryFactory. If QueueEntryFactory is null, a DefaultQueueEntry instance is returned. This property is only used when EnableBuiltInQueueSystem is set to true.

QueueEntryFactory

Sets a factory function that creates queue entry objects. This allows you to customize the type of queue entry used by the LavalinkGuildPlayer when EnableBuiltInQueueSystem is true. If set to null, the default queue entry type (DefaultQueueEntry) will be used.

Region

Sets the voice region ID for the Lavalink connection.

This should be used if nodes should be filtered by region with GetIdealSession(DiscordVoiceRegion?).

RestEndpoint

Sets the endpoint for Lavalink REST.

Defaults to 127.0.0.1 on port 2333.

ResumeTimeout

Sets the time in seconds when all voice sessions are closed after the client disconnects.

Defaults to 60 seconds.

SocketAutoReconnect

Sets whether the connection wrapper should attempt automatic reconnects should the connection drop.

Defaults to true.

SocketEndpoint

Sets the endpoint for the Lavalink Websocket connection.

Defaults to 127.0.0.1 on port 2333.

WebSocketCloseTimeout

Sets the time in milliseconds to wait for Lavalink's voice WebSocket to close after leaving a voice channel.

This will be the delay before the guild connection is removed.

Defaults to 3000 milliseconds.