Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace LavalinkTypes

Index

Type aliases

ConfigureResuming

ConfigureResuming: Message<"configureResuming", ConfigureResumingData>

DecodeTrackResponse

DecodeTrackResponse: TrackInfo

Response of GET /decodetrack.

DecodeTracksRequest

DecodeTracksRequest: EncodedTrack[]

Request body of POST /decodetracks.

DecodeTracksResponse

DecodeTracksResponse: TrackInfo[]

Response of POST /decodetracks.

Destroy

Destroy: PlayerMessage<"destroy">

Destroys the player.

EncodedTrack

EncodedTrack: string

A base64 encoded track, due to lavalink being developed in java it cannot be decoded "normally".

see

https://www.npmjs.com/package/@lavalink/encoding

Equalizer

Equalizer: PlayerMessage<"equalizer", EqualizerData>

Sets the equalizer of the player.

deprecated

This operation will be removed in Lavalink v4, use filters instead.

EqualizerFilter

EqualizerFilter: EqualizerBand[]

Filters

Filters: PlayerMessage<"filters", Partial<FilterData>>

Payload for configuring the filters of a player.

IncomingMessage

IncomingMessage: PlayerEvent | PlayerUpdate | Stats

Incoming messages.

LavalinkMessage

LavalinkMessage: IncomingMessage | OutgoingMessage

All types of messages.

LoadFailed

LoadFailed: Response<LoadFailed, { exception: FriendlyException }>

Returned if lavaplayer failed to load something.

LoadTracksResponse

Possible responses of GET /loadtracks.

Message

Message<O, D>: { op: O } & D

Type parameters

NoMatches

NoMatches: Response<NoMatches>

Returned if no matches/sources could be found for a given identifier.

OpCode

The available operations.

OtherOpCode

OtherOpCode: "configureResuming" | "stats"

Other op codes.

OutgoingMessage

Outgoing messages.

Pause

Pause: PlayerMessage<"pause", PauseData>

Pauses playback of the current track.

Play

Play: PlayerMessage<"play", PlayData>

Starts playback of the supplied track.

PlayerEvent

An event related to an audio player.

PlayerEventType

PlayerEventType: "TrackStartEvent" | "TrackEndEvent" | "TrackExceptionEvent" | "TrackStuckEvent" | "WebSocketClosedEvent"

PlayerMessage

PlayerMessage<O, D>: Message<O, { guildId: string } & D>

Type parameters

PlayerOpCode

PlayerOpCode: "voiceUpdate" | "stop" | "play" | "pause" | "seek" | "filters" | "destroy" | "equalizer" | "playerUpdate" | "event" | "volume"

Available operations for a player.

PlayerOutgoingMessage

PlayerOutgoingMessage: Filters | Play | Stop | Seek | Destroy | Volume | Equalizer | Pause | VoiceUpdate

Outgoing messages related to a player.

PlayerUpdate

PlayerUpdate: PlayerMessage<"playerUpdate", PlayerUpdateData>

PlaylistLoaded

PlaylistLoaded: Response<PlaylistLoaded>

Returned when a playlist is loaded.

RoutePlanner

Classes

RoutePlannerClass

RoutePlannerClass: "RotatingIpRoutePlanner" | "NanoIpRoutePlanner" | "RotatingNanoIpRoutePlanner"

SearchResult

SearchResult: Response<SearchResult>

Returned when a search result is made (i.e. ytsearch: some song)

Seek

Seek: PlayerMessage<"seek", SeekData>

Seeks to the supplied position.

Stats

Stats: Message<"stats", StatsData>

Stats about the node.

Stop

Stop: PlayerMessage<"stop">

Stops playback of the current track.

TrackEndEvent

TrackEndEvent: Event<"TrackEndEvent", TrackEndEventData>

TrackExceptionEvent

TrackExceptionEvent: Event<"TrackExceptionEvent", TrackExceptionEventData>

Event that is fired when an exception occurs in an audio track that causes it to halt or not start.

TrackLoaded

TrackLoaded: Response<TrackLoaded>

Returned when a single track was loaded

TrackStartEvent

TrackStartEvent: Event<"TrackStartEvent", TrackStartEventData>

Event that is fired when a track starts playing.

TrackStuckEvent

TrackStuckEvent: Event<"TrackStuckEvent", TrackStuckEventData>

Event that is fired when a track was started, but no audio frames from it have arrived in a long time, specified by the threshold set.

TremoloFilter

TremoloFilter: OscillatingFilter

Filter that uses amplification to create a shuddering effect, where the volume quickly oscillates.

VibratoFilter

VibratoFilter: OscillatingFilter

Similar to tremolo, whereas vibrato oscillates the pitch.

VoiceUpdate

VoiceUpdate: PlayerMessage<"voiceUpdate", VoiceUpdateData>

Payload for providing an intercepted voice server & state update

Volume

Volume: PlayerMessage<"volume", VolumeData>

Sets the volume of the player.

deprecated

This operation will be removed in Lavalink v4, use filters instead.

VolumeFilter

VolumeFilter: number

Float value where 1.0 is 100%.

WebSocketClosedEvent

WebSocketClosedEvent: Event<"WebSocketClosedEvent", WebSocketClosedEventData>

Event that is fired when an audio websocket (to Discord) is closed.

Variables

Const mayStartNext

mayStartNext: Record<TrackEndReason, Boolean>

Generated using TypeDoc