Discolink
    Preparing search index...

    Interface PlayerEventMap

    interface PlayerEventMap {
        init: [];
        nodeConnect: [node: Node, reconnects: number];
        nodeReady: [node: Node, resumed: boolean, sessionId: string];
        nodeDispatch: [node: Node, payload: MessagePayload];
        nodeError: [node: Node, error: Error];
        nodeClose: [node: Node, code: number, reason: string];
        nodeDisconnect: [
            node: Node,
            code: number,
            reason: string,
            byLocal: boolean,
        ];
        voiceConnect: [voice: VoiceState];
        voiceClose: [
            voice: VoiceState,
            code: number,
            reason: string,
            byRemote: boolean,
        ];
        voiceChange: [voice: VoiceState, previousNode: Node, wasPlaying: boolean];
        voiceDisconnect: [voice: VoiceState, details: VoiceDisconnectDetails];
        queueCreate: [queue: Queue<QueueContext>];
        queueUpdate: [queue: Queue<QueueContext>, state: PlayerState];
        queueFinish: [
            queue: Queue<QueueContext>,
            reason: QueueEndReason,
            error?: Error,
        ];
        queueDestroy: [queue: Queue<QueueContext>, reason: string];
        trackStart: [
            queue: Queue<QueueContext>,
            track: Track<CommonUserData, CommonPluginInfo>,
        ];
        trackStuck: [
            queue: Queue<QueueContext>,
            track: Track<CommonUserData, CommonPluginInfo>,
            thresholdMs: number,
        ];
        trackError: [
            queue: Queue<QueueContext>,
            track: Track<CommonUserData, CommonPluginInfo>,
            exception: Exception,
        ];
        trackFinish: [
            queue: Queue<QueueContext>,
            track: Track<CommonUserData, CommonPluginInfo>,
            reason: TrackEndReason,
        ];
    }
    Index
    init: []

    Fired when the player is initialized.

    nodeConnect: [node: Node, reconnects: number]

    Fired when connection to a node succeeds.

    nodeReady: [node: Node, resumed: boolean, sessionId: string]

    Fired when a connected node signals ready.

    nodeDispatch: [node: Node, payload: MessagePayload]

    Fired when a node receives a payload.

    nodeError: [node: Node, error: Error]

    Fired when connection to a node errors.

    nodeClose: [node: Node, code: number, reason: string]

    Fired when connection to a node closes and enters reconnecting.

    This event is skipped for nodeDisconnect in case of explicit disconnects or nodes with reconnections disabled.

    nodeDisconnect: [node: Node, code: number, reason: string, byLocal: boolean]

    Fired when a node is disconnected and no longer reconnecting.

    voiceConnect: [voice: VoiceState]

    Fired when a new (or disconnected) VoiceState's node connects to a voice server.

    voiceClose: [voice: VoiceState, code: number, reason: string, byRemote: boolean]

    Fired when the connection between a VoiceState's node and voice server closes.

    Depending on the close code and PlayerOptions.voiceReconnect, the VoiceState will attempt a reconnect.

    voiceChange: [voice: VoiceState, previousNode: Node, wasPlaying: boolean]

    Fired when a VoiceState's node is changed.

    voiceDisconnect: [voice: VoiceState, details: VoiceDisconnectDetails]

    Fired when a VoiceState has failed to reconnect and disconnected.

    As such, this event will never fire if PlayerOptions.voiceReconnect is disabled.

    queueCreate: [queue: Queue<QueueContext>]

    Fired when a queue is created.

    queueUpdate: [queue: Queue<QueueContext>, state: PlayerState]

    Fired when a queue's lavalink player state updates.

    queueFinish: [queue: Queue<QueueContext>, reason: QueueEndReason, error?: Error]

    Fired when a queue finishes.

    queueDestroy: [queue: Queue<QueueContext>, reason: string]

    Fired when a queue is destroyed.

    trackStart: [
        queue: Queue<QueueContext>,
        track: Track<CommonUserData, CommonPluginInfo>,
    ]

    Fired when a track starts playing.

    trackStuck: [
        queue: Queue<QueueContext>,
        track: Track<CommonUserData, CommonPluginInfo>,
        thresholdMs: number,
    ]

    Fired when a track is stuck.

    trackError: [
        queue: Queue<QueueContext>,
        track: Track<CommonUserData, CommonPluginInfo>,
        exception: Exception,
    ]

    Fired when a track errors.

    trackFinish: [
        queue: Queue<QueueContext>,
        track: Track<CommonUserData, CommonPluginInfo>,
        reason: TrackEndReason,
    ]

    Fired when a track finishes.