Changes in 2.10.1โ
โ ๏ธ If you are using a version lower than 2.10.0, please refer to upgrade guide to 2.10.0 first, as v2.10.0 is the major release containing the braking changes. Please update your code accordingly.
โ A focused patch release resolving type naming conflicts, a Lavalink v4 REST compliance fix, and several player correctness bugs.
How to updateโ
- npm
- pnpm
- yarn
npm update magmastream
pnpm update magmastream
yarn upgrade magmastream
Fixes & Improvementsโ
RestPlayOptions corrected for Lavalink v4โ
The data object was sending fields in the wrong shape for the Lavalink v4 REST API, causing playback to not work correctly. encodedTrack and identifier are now nested inside a track object, and noReplace has moved to the top level of RestPlayOptions.
Before:
data: {
encodedTrack?: string;
identifier?: string;
noReplace?: boolean;
// ...
}
After:
noReplace?: boolean;
data: {
track?: {
encoded?: string | null;
identifier?: string | null;
userData?: object;
};
// ...
}
VoiceState naming conflict resolvedโ
The duplicate VoiceState interface has been split into two properly named types:
DiscordVoiceStateโ the payload received from Discord'sVOICE_STATE_UPDATEevent.PlayerVoiceStateโ the internal structure sent to the Lavalink node.
VoiceState is kept as a deprecated union alias (DiscordVoiceState | PlayerVoiceState) for backwards compatibility but will be removed in a future release.
RedisConfig.port corrected to numberโ
RedisConfig.port was incorrectly typed as string. It is now number.
player.stop() missing track.encodedโ
player.stop() was sending an incomplete payload to Lavalink, missing the track.encoded property. This caused stop to silently fail in some cases.
player.pause() called unconditionally on restoreโ
When restoring a player from state, player.pause() was called regardless of whether the player was actually paused. It now only pauses if state.paused is true.
Questions?โ
Join our Discord โ we're happy to help.