Skip to main content
Version: v2.9.0

Player Events: Base Event

All Lavalink events inherit from this base event structure.
You can use this structure to narrow or type-check incoming player events regardless of their specific payload.

PlayerEvent

Base interface shared across all Lavalink player events.

Property Type Description Optional
opstring = "event"Lavalink operation identifier.
typePlayerEventTypeSpecific event type.
guildIdstringGuild this event refers to.

PlayerEventType

Union of all possible event types that may be emitted by the Lavalink player instance.

type PlayerEventType =
| "TrackStartEvent"
| "TrackEndEvent"
| "TrackExceptionEvent"
| "TrackStuckEvent"
| "WebSocketClosedEvent"
| "SegmentSkipped"
| "SegmentsLoaded"
| "ChaptersLoaded"
| "ChapterStarted"
| "LyricsFound"
| "LyricsNotFound"
| "LyricsLine";