Interface RainlinkEventsInterface

interface RainlinkEventsInterface {
    debug: [logs: string];
    nodeConnect: [node: RainlinkNode];
    nodeDisconnect: [node: RainlinkNode, code: number, reason: string | Buffer];
    nodeReconnect: [node: RainlinkNode];
    nodeClosed: [node: RainlinkNode];
    nodeError: [node: RainlinkNode, error: Error];
    playerCreate: [player: RainlinkPlayer];
    playerDestroy: [player: RainlinkPlayer];
    playerException: [player: RainlinkPlayer, data: Record<string, any>];
    playerUpdate: [player: RainlinkPlayer, data: Record<string, any>];
    playerPause: [player: RainlinkPlayer, track: RainlinkTrack];
    playerResume: [player: RainlinkPlayer, data: RainlinkTrack];
    playerWebsocketClosed: [player: RainlinkPlayer, data: Record<string, any>];
    trackStart: [player: RainlinkPlayer, track: RainlinkTrack];
    trackEnd: [player: RainlinkPlayer, track: RainlinkTrack];
    trackStuck: [player: RainlinkPlayer, data: Record<string, any>];
    trackResolveError: [player: RainlinkPlayer, track: RainlinkTrack, message: string];
    queueAdd: [player: RainlinkPlayer, queue: RainlinkQueue, track: RainlinkTrack[]];
    queueRemove: [player: RainlinkPlayer, queue: RainlinkQueue, track: RainlinkTrack];
    queueShuffle: [player: RainlinkPlayer, queue: RainlinkQueue];
    queueClear: [player: RainlinkPlayer, queue: RainlinkQueue];
    queueEmpty: [player: RainlinkPlayer, queue: RainlinkQueue];
}

Events

debug: [logs: string]

Emitted when rainlink have a debug log. Rainlink#debug

nodeConnect: [node: RainlinkNode]

Emitted when a lavalink server is connected. Rainlink#nodeConnect

nodeDisconnect: [node: RainlinkNode, code: number, reason: string | Buffer]

Emitted when a lavalink server is disconnected. Rainlink#nodeDisconnect

nodeReconnect: [node: RainlinkNode]

Emitted when a lavalink server is trying to reconnect. Rainlink#nodeReconnect

nodeClosed: [node: RainlinkNode]

Emitted when a lavalink server is closed. Rainlink#nodeClosed

nodeError: [node: RainlinkNode, error: Error]

Emitted when a lavalink server is errored. Rainlink#nodeError

playerCreate: [player: RainlinkPlayer]

Emitted when a player is created. Rainlink#playerCreate

playerDestroy: [player: RainlinkPlayer]

Emitted when a player is going to destroyed. Rainlink#playerDestroy

playerException: [player: RainlinkPlayer, data: Record<string, any>]

Emitted when a player have an exception. Rainlink#playerException

playerUpdate: [player: RainlinkPlayer, data: Record<string, any>]

Emitted when a player updated info. Rainlink#playerUpdate

playerPause: [player: RainlinkPlayer, track: RainlinkTrack]

Emitted when a track paused. Rainlink#playerPause

playerResume: [player: RainlinkPlayer, data: RainlinkTrack]

Emitted when a track resumed. Rainlink#playerResume

playerWebsocketClosed: [player: RainlinkPlayer, data: Record<string, any>]

Emitted when a player's websocket closed. Rainlink#playerWebsocketClosed

trackStart: [player: RainlinkPlayer, track: RainlinkTrack]

Emitted when a track is going to play. Rainlink#trackStart

trackEnd: [player: RainlinkPlayer, track: RainlinkTrack]

Emitted when a track is going to end. Rainlink#trackEnd

trackStuck: [player: RainlinkPlayer, data: Record<string, any>]

Emitted when a track stucked. Rainlink#trackStuck

trackResolveError: [player: RainlinkPlayer, track: RainlinkTrack, message: string]

Emitted when a track is failed to resolve using fallback search engine. Rainlink#trackResolveError

queueAdd: [player: RainlinkPlayer, queue: RainlinkQueue, track: RainlinkTrack[]]

Emitted when a track added into queue. Rainlink#queueAdd

queueRemove: [player: RainlinkPlayer, queue: RainlinkQueue, track: RainlinkTrack]

Emitted when a track removed from queue. Rainlink#queueRemove

queueShuffle: [player: RainlinkPlayer, queue: RainlinkQueue]

Emitted when a queue shuffled. Rainlink#queueShuffle

queueClear: [player: RainlinkPlayer, queue: RainlinkQueue]

Emitted when a queue cleared. Rainlink#queueClear

queueEmpty: [player: RainlinkPlayer, queue: RainlinkQueue]

Emitted when a queue is empty. Rainlink#queueEmpty