Skip to main content
Version: v2.10.1

Interface: SerializedPlayerState

Represents the full serialized state of a Player, written to and read from the configured state storage backend (Memory, Redis, or JSON).
Used internally by PlayerUtils.serializePlayer() and Manager.loadPlayerStates() to persist and restore players across restarts.


SerializedPlayerState

Property Type Description Optional
clusterIdnumberThe cluster ID of the manager instance that owned this player.
guildIdstringThe guild ID this player belongs to.
voiceChannelIdstring | nullThe voice channel ID, or null if not connected.
textChannelIdstring | nullThe text channel ID, or null if unset.
volumenumberThe player's volume level at time of serialization.
positionnumberThe playback position in milliseconds at time of serialization.
pausedbooleanWhether the player was paused.
playingbooleanWhether the player was actively playing.
trackRepeatbooleanWhether track repeat was enabled.
queueRepeatbooleanWhether queue repeat was enabled.
dynamicRepeatbooleanWhether dynamic repeat was enabled.
isAutoplaybooleanWhether autoplay was enabled.
autoplayTriesnumberThe number of autoplay retry attempts at time of serialization.
dynamicLoopIntervalnumberThe dynamic loop interval in milliseconds, if set.
voiceStatePlayerVoiceStateThe voice state at time of serialization.
optionsPlayerOptionsThe player options used to create the player.
nodeSerializedNode | nullThe node the player was connected to, or null if no node was assigned.
queueSerializedQueueThe serialized queue state.
filtersSerializedFilters | nullThe active filter state, or null if no filters were applied.
dataSerializedDataOptional developer-defined data attached to the player, including client user and now-playing message.

SerializedNode

The node the player was connected to at time of serialization.

Property Type Description Optional
sessionIdstringThe Lavalink session ID for this node connection.
options.identifierstringThe identifier of the node.

SerializedQueue

The serialized queue state at time of serialization.

Property Type Description Optional
currentTrack | nullThe track currently playing, or null if none.
tracksTrack[]The upcoming tracks in the queue.
previousArray<Track | null>Previously played tracks.

SerializedFilters

The active filter state at time of serialization.

Property Type Description Optional
bassBoostlevelnumber | nullThe bass boost level, or null if not set.
equalizerEqualizerBand[]The equalizer band configuration.
distortionDistortionOptionsThe distortion filter settings.
karaokeKaraokeOptionsThe karaoke filter settings.
timescaleTimescaleOptionsThe timescale filter settings.
vibratoVibratoOptionsThe vibrato filter settings.
rotationRotationOptionsThe rotation filter settings.
reverbReverbOptionsThe reverb filter settings.
volumenumberThe filter volume level.
filterStatusRecord<string, boolean>A map of filter names to their enabled state.

SerializedData

Optional developer-defined data persisted with the player.

Property Type Description Optional
clientUserAnyUserThe bot's own user object at time of serialization.
nowPlayingMessageNowPlayingMessage | nullA minimal reference to the now-playing message, or null if none.
...unknownAny additional developer-defined keys.

NowPlayingMessage

A minimal serializable reference to a now-playing message.

Property Type Description Optional
idstringThe message ID.
channelIdstringThe channel ID the message was sent in.
guildIdstringThe guild ID the message belongs to.