Skip to content

LavalinkManagerEvents

The events from the lavalink Manager

Events

EventTypeDescriptionDefined in
ChaptersLoaded(player: Player, track: UnresolvedTrack | Track, payload: SponsorBlockChaptersLoaded) => voidSPONSORBLOCK-PLUGIN EVENT Emitted when Chapters are loaded Link https://github.com/topi314/Sponsorblock-Plugin#chaptersloaded Manager#trackErrorsrc/structures/Types/Manager.ts:158
ChapterStarted(player: Player, track: UnresolvedTrack | Track, payload: SponsorBlockChapterStarted) => voidSPONSORBLOCK-PLUGIN EVENT Emitted when a specific Chapter starts playing Link https://github.com/topi314/Sponsorblock-Plugin#chapterstarted Manager#trackErrorsrc/structures/Types/Manager.ts:150
debug(eventKey: DebugEvents, eventData: object) => voidLavalink-Client Debug Event Emitted for several erros, and logs within lavalink-client, if managerOptions.advancedOptions.enableDebugEvents is true Useful for debugging the lavalink-client Manager#debugsrc/structures/Types/Manager.ts:167
LyricsFound(player: Player, track: UnresolvedTrack | Track, payload: LyricsFoundEvent) => voidEmitted when a Lyrics is found Link https://github.com/topi314/LavaLyrics Manager#LyricsFoundsrc/structures/Types/Manager.ts:181
LyricsLine(player: Player, track: UnresolvedTrack | Track, payload: LyricsLineEvent) => voidEmitted when a Lyrics line is received Link https://github.com/topi314/LavaLyrics Manager#LyricsLinesrc/structures/Types/Manager.ts:174
LyricsNotFound(player: Player, track: UnresolvedTrack | Track, payload: LyricsNotFoundEvent) => voidEmitted when a Lyrics is not found Link https://github.com/topi314/LavaLyrics Manager#LyricsNotFoundsrc/structures/Types/Manager.ts:188
playerCreate(player: Player) => voidEmitted when a Player is created. Manager#playerCreatesrc/structures/Types/Manager.ts:43
playerDeafChange(player: Player, selfDeafed: boolean, serverDeafed: boolean) => voidEmitted when the player’s selfDeafed or serverDeafed state changed (true -> falsefalse -> true) Manager#playerDeafChange
playerDestroy(player: Player, destroyReason?: string) => voidEmitted when a Player get’s destroyed Manager#playerDestroysrc/structures/Types/Manager.ts:72
playerDisconnect(player: Player, voiceChannelId: string) => voidEmitted when a Player is disconnected from a channel. Manager#playerDisconnectsrc/structures/Types/Manager.ts:53
playerMove(player: Player, oldVoiceChannelId: string, newVoiceChannelId: string) => voidEmitted when a Player is moved within the channel. Manager#playerMovesrc/structures/Types/Manager.ts:48
playerMuteChange(player: Player, selfMuted: boolean, serverMuted: boolean) => voidEmitted when the player’s selfMuted or serverMuted state changed (true -> falsefalse -> true) Manager#playerMuteChange
playerQueueEmptyCancel(player: Player) => voidEmitted when the player’s queue got empty, and the timeout got cancelled becuase a track got re-added to it. Manager#playerQueueEmptyEndsrc/structures/Types/Manager.ts:114
playerQueueEmptyEnd(player: Player) => voidEmitted when the player’s queue got empty, and the timeout finished leading to destroying the player Manager#playerQueueEmptyEndsrc/structures/Types/Manager.ts:108
playerQueueEmptyStart(player: Player, timeoutMs: number) => voidEmitted when the player’s queue got empty, and the timeout started Manager#playerQueueEmptyStartsrc/structures/Types/Manager.ts:102
playerSocketClosed(player: Player, payload: WebSocketClosedEvent) => voidEmitted when a Node-Socket got closed for a specific Player. Usually emits when the audio websocket to discord is closed, This can happen for various reasons (normal and abnormal), e.g. when using an expired voice server update. 4xxx codes are usually bad. So this is just information, normally lavalink should handle disconnections Discord Docs: Link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes Lavalink Docs: Link https://lavalink.dev/api/websocket.html#websocketclosedevent Manager#playerSocketClosedsrc/structures/Types/Manager.ts:67
playerSuppressChange(player: Player, suppress: boolean) => voidEmitted when the player’s suppressed (true -> falsefalse -> true) Manager#playerSuppressChange
playerUpdate(oldPlayerJson: PlayerJson, newPlayer: Player) => voidAlways emits when the player (on lavalink side) got updated Manager#playerUpdatesrc/structures/Types/Manager.ts:78
playerVoiceJoin(player: Player, userId: string) => voidEmitted, when a user joins the voice channel, while there is a player existing Manager#playerQueueEmptyStartsrc/structures/Types/Manager.ts:120
playerVoiceLeave(player: Player, userId: string) => voidEmitted, when a user leaves the voice channel, while there is a player existing Manager#playerQueueEmptyEndsrc/structures/Types/Manager.ts:126
queueEnd(player: Player, track: UnresolvedTrack | Track, payload: TrackEndEvent | TrackStuckEvent | TrackExceptionEvent) => voidEmitted when the Playing finished and no more tracks in the queue. Manager#queueEndsrc/structures/Types/Manager.ts:38
SegmentSkipped(player: Player, track: UnresolvedTrack | Track, payload: SponsorBlockSegmentSkipped) => voidSPONSORBLOCK-PLUGIN EVENT Emitted when a specific Segment was skipped Link https://github.com/topi314/Sponsorblock-Plugin#segmentskipped Manager#trackErrorsrc/structures/Types/Manager.ts:142
SegmentsLoaded(player: Player, track: UnresolvedTrack | Track, payload: SponsorBlockSegmentsLoaded) => voidSPONSORBLOCK-PLUGIN EVENT Emitted when Segments are loaded Link https://github.com/topi314/Sponsorblock-Plugin#segmentsloaded Manager#trackErrorsrc/structures/Types/Manager.ts:134
trackEnd(player: Player, track: Track, payload: TrackEndEvent) => voidEmitted when a Track finished. Manager#trackEndsrc/structures/Types/Manager.ts:23
trackError(player: Player, track: UnresolvedTrack | Track, payload: TrackExceptionEvent) => voidEmitted when a Track errored. Manager#trackErrorsrc/structures/Types/Manager.ts:33
trackStart(player: Player, track: Track, payload: TrackStartEvent) => voidEmitted when a Track started playing. Manager#trackStartsrc/structures/Types/Manager.ts:18
trackStuck(player: Player, track: Track, payload: TrackStuckEvent) => voidEmitted when a Track got stuck while playing. Manager#trackStucksrc/structures/Types/Manager.ts:28