Skip to main content
Version: v2.9.2

Interface: RestPlayOptions

This interface defines the payload for starting or controlling playback through Lavalink's REST endpoint.
It supports specifying the track (either encoded or by identifier), playback settings, filters, and voice connection parameters.


RestPlayOptions

Main structure containing playback options for a specific guild.

Property Type Description Optional
guildIdstringThe ID of the guild where playback is controlled.
dataRestPlayDataPlayback details and parameters.

RestPlayData

Playback details for a specific track and player state.

Property Type Description Optional
encodedTrackstringThe base64 encoded track to play.
identifierstringThe track identifier (alternative to encodedTrack).
startTimenumberThe position (in milliseconds) to start playback.
endTimenumberThe position (in milliseconds) to end playback.
volumenumberThe volume level for playback (0–1000).
positionnumberThe current playback position in milliseconds.
pausedbooleanWhether the player is paused.
filtersobjectAudio effects or filters to apply.
voiceVoicePayloadVoice connection details for playback.
noReplacebooleanIf true, prevents replacing the currently playing track when a new play payload is sent.

VoicePayload

Information required to connect the player to Discord voice.

Property Type Description Optional
tokenstringDiscord voice token.
sessionIdstringVoice session ID.
endpointstringDiscord voice server endpoint.