LinkConfig

data class LinkConfig(var autoReconnect: Boolean = true, var autoMigrateOnDisconnect: Boolean = true, var resumeTimeout: Int = 60, var retry: Retry = LinearRetry(2.seconds, 60.seconds, 10), val showTrace: Boolean = false) : LavaKordOptions.LinkConfig

Mutable implementation of LavaKordOptions.LinkConfig.

Constructors

Link copied to clipboard
constructor(autoReconnect: Boolean = true, autoMigrateOnDisconnect: Boolean = true, resumeTimeout: Int = 60, retry: Retry = LinearRetry(2.seconds, 60.seconds, 10), showTrace: Boolean = false)

Properties

Link copied to clipboard
open override var autoMigrateOnDisconnect: Boolean

Whether to try to migrate links from a disconnected node onto a new one. This option has no effect if autoReconnect is false. If the node is trying to resume, the migration will only take place after the node gives up on resuming as per retry.

Link copied to clipboard
open override var autoReconnect: Boolean

Whether to auto-reconnect links or not

Link copied to clipboard
open override var resumeTimeout: Int

amount of seconds Lavalink will wait to kill all players if the client fails to resume it's connection

Link copied to clipboard
open override var retry: Retry

retry strategy (See Retry and LinearRetry)

Link copied to clipboard
open override val showTrace: Boolean = false

whether RestError.trace should be populated

Functions

Link copied to clipboard
fun linear(firstBackoff: Long, maxBackoff: Long, maxTries: Int): Retry
fun linear(firstBackoff: Duration, maxBackoff: Duration, maxTries: Int): Retry

Creates a linear Retry strategy.