Skip to main content
Version: v2.10.3

SerializedPlayerState

Saved state includes autoplay mode, retry count, and portable requester data. JSON and Redis restores rehydrate this state; wrapper adapters retain their user-resolution callbacks.

Definition​

export interface SerializedPlayerState {
clusterId: number;
guildId: string;
voiceChannelId: string | null;
textChannelId: string | null;
volume: number;
position: number;
isAutoplay?: boolean;
autoplayTries?: number;
paused: boolean;
playing: boolean;
trackRepeat: boolean;
queueRepeat: boolean;
dynamicRepeat: boolean;
dynamicLoopInterval?: number;
voiceState: PlayerVoiceState;
options: PlayerOptions;
node: {
sessionId: string;
options: {
identifier: string;
};
} | null;
queue: {
current: Track | null;
tracks: Track[];
previous: Array<Track | null>;
};
filters: {
bassBoostlevel: number | null;
equalizer: EqualizerBand[];
distortion: DistortionOptions | null;
karaoke: KaraokeOptions | null;
timescale: TimescaleOptions | null;
tremolo: TremoloOptions | null;
vibrato: VibratoOptions | null;
rotation: RotationOptions | null;
channelMix: ChannelMixOptions | null;
lowPass: LowPassOptions | null;
highpass: HighPassOptions | null;
echo: EchoOptions | null;
chorus: ChorusOptions | null;
compressor: CompressorOptions | null;
flanger: FlangerOptions | null;
phaser: PhaserOptions | null;
phonograph: PhonographOptions | null;
spatial: SpatialOptions | null;
tape: TapeOptions | null;
pluginFilters: Record<string, unknown>;
reverb: ReverbOptions | null;
volume: number;
filterStatus: Record<string, boolean>;
} | null;
data?: Record<string, unknown> & {
clientUser?: AnyUser;
nowPlayingMessage?: {
id: string;
channelId: string;
guildId: string;
} | null;
};
}