Class LavalinkConfiguration
Lavalink connection configuration.
Inheritance
Namespace: DSharpPlus.Lavalink
Assembly: cs.temp.dll.dll
Syntax
public sealed class LavalinkConfiguration
Constructors
LavalinkConfiguration()
Creates a new instance of LavalinkConfiguration.
Declaration
public LavalinkConfiguration()
LavalinkConfiguration(LavalinkConfiguration)
Creates a new instance of LavalinkConfiguration, copying the properties of another configuration.
Declaration
public LavalinkConfiguration(LavalinkConfiguration other)
Parameters
Type | Name | Description |
---|---|---|
LavalinkConfiguration | other | Configuration the properties of which are to be copied. |
Properties
Password
Sets the password for the Lavalink connection.
Defaults to "youshallnotpass".
Declaration
public string Password { set; }
Property Value
Type | Description |
---|---|
System.String |
Region
Sets the voice region ID for the Lavalink connection.
This should be used if nodes should be filtered by region with GetIdealNodeConnection(DiscordVoiceRegion).
Declaration
public DiscordVoiceRegion Region { set; }
Property Value
Type | Description |
---|---|
DiscordVoiceRegion |
RestEndpoint
Sets the endpoint for Lavalink REST.
Defaults to 127.0.0.1 on port 2333.
Declaration
public ConnectionEndpoint RestEndpoint { set; }
Property Value
Type | Description |
---|---|
ConnectionEndpoint |
ResumeKey
Sets the resume key for the Lavalink connection.
This will allow existing voice sessions to continue for a certain time after the client is disconnected.
Declaration
public string ResumeKey { set; }
Property Value
Type | Description |
---|---|
System.String |
ResumeTimeout
Sets the time in seconds when all voice sessions are closed after the client disconnects.
Defaults to 60 seconds.
Declaration
public int ResumeTimeout { set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SocketAutoReconnect
Sets whether the connection wrapper should attempt automatic reconnects should the connection drop.
Defaults to true.
Declaration
public bool SocketAutoReconnect { set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SocketEndpoint
Sets the endpoint for the Lavalink Websocket connection.
Defaults to 127.0.0.1 on port 2333.
Declaration
public ConnectionEndpoint SocketEndpoint { set; }
Property Value
Type | Description |
---|---|
ConnectionEndpoint |
WebSocketCloseTimeout
Sets the time in miliseconds 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 miliseconds.
Declaration
public int WebSocketCloseTimeout { set; }
Property Value
Type | Description |
---|---|
System.Int32 |