ManagerPlayerOptions

Type: objectarrow-up-right

Parameter
Type
Required
Description

applyVolumeAsFilter

X

If set to true, it will use the Lavalink's filter.volume instead of lavalink.volume.

clientBasedPositionUpdateInterval

X

How frequently to update the player.position on the client side for more accurate position display, without requiring "more" cpu usage

defaultSearchPlatform

X

which SearchPlatform to use, when no Platform was provided doring player.search

volumeDecrementer

X

Decrement the Volume on the Lavalink server by a x % (decimal. aka decrement 70% => 0.7)

requesterTransformer

X

Transform the Requester User Object, to something you want, to reduce track-object-size aka save memory

onDisconnect

{

autoReconnect?: booleanarrow-up-right

destroyPlayer?: booleanarrow-up-right

}

X

What the Manager should do when the Bot get's disconnected

onDisconnect.autoReconnect

X

Should the Manager try to reconnect the Bot?

onDisconnect.destroyPlayer

X

Or should the Manager directly Destroy the Player (overrides autoReconnect)

onEmptyQueue

{

destroyAfterMs?: numberarrow-up-right

autoPlayFunction?: () =>

}

X

What the Manager should do when the Queue get's empty

onEmptyQueue.destroyAfterMs

X

== 0 => Destroy Player immediately > 0 => Destroy Player after that amount (in Milliseconds) < 0 || NaN || undefined => Don't destroy the Player

onEmptyQueue.autoPlayFunction

X

This Function get's execute when the queue ends (before queueEnd event fires). If this Function adds a Track to the Queue, it get's played and the event doesn't fire (but trackEnd does)

useUnresolvedData

X

If true, and you provide an unresolvedTrack, when resolving the Track, it overrides the real data with the provided data (to fake/enforce sources / titles, whatever)

Example

{
    applyVolumeAsFilter: false,
    clientBasedPositionUpdateInterval: 50,
    defaultSearchPlatform: "ytmsearch",
    volumeDecrementer: 0.75, // on client 100% == on lavalink 75%
    requesterTransformer: requesterTransformer,
    onDisconnect: {
        autoReconnect: true, // automatically attempts a reconnect, if the bot disconnects from the voice channel, if it fails, it get's destroyed
        destroyPlayer: false // overrides autoReconnect and directly destroys the player if the bot disconnects from the vc
    },
    onEmptyQueue: {
        destroyAfterMs: 30_000, // 0 === instantly destroy | don't provide the option, to don't destroy the player
        autoPlayFunction: autoPlayFunction,
    },
    useUnresolvedData: true
}

Interface

Last updated