Skip to main content
Version: v2.10.2 (current)

Changes in 2.10.2โ€‹

warning

โš ๏ธ 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 breaking changes. Please update your code accordingly.

tip

โœ… New wrappers, Yandex support, expanded Redis config, and several correctness fixes.

How to updateโ€‹

npm update magmastream

New Featuresโ€‹

Yandex Music supportโ€‹

Yandex Music is now a supported platform across the board:


CloudstormManager wrapperโ€‹

A new CloudstormManager wrapper is available for bots built with the CloudStorm gateway library. CloudStorm is gateway-only with no built-in cache โ€” you must call manager.init({ clientId: "..." }) manually inside your ready event.

import { CloudstormManager } from "magmastream";

const manager = new CloudstormManager(client, options);

client.once("ready", async () => {
await manager.init({ clientId: "your-bot-id" });
});

StandaloneManagerOptionsโ€‹

A new StandaloneManagerOptions interface formalises direct new Manager(...) usage. When constructing a Manager without a built-in wrapper you must now supply getUser and getGuild cache callbacks. Built-in wrappers continue to work unchanged.

import { Manager } from "magmastream";
import type { StandaloneManagerOptions } from "magmastream";

const manager = new Manager({
nodes: [...],
send: (packet) => { /* forward to gateway */ },
getUser: (id) => client.users.cache.get(id),
getGuild: (id) => client.guilds.cache.get(id),
} satisfies StandaloneManagerOptions);

RedisConfig extended with full ioredis optionsโ€‹

RedisConfig now extends ioredis RedisOptions directly, giving you access to the full ioredis configuration surface. The previous manually-listed fields (host, port, password, db) are inherited from RedisOptions. Only prefix is still added on top.


handleShutdown() โ€” optional stopProcess callbackโ€‹

manager.handleShutdown() now accepts an optional async callback that runs after all players are saved and nodes are disconnected, letting you run custom cleanup before the process exits instead of always calling process.exit(0).

await manager.handleShutdown(async () => {
await myDatabase.disconnect();
});

New types: LavalinkSession, LastFmResponseโ€‹

  • LavalinkSession โ€” represents a Lavalink session object returned by the REST API.
  • LastFmResponse โ€” represents the Last.fm API response (was previously untyped).

Fixesโ€‹

noReplace now correctly read from PlayOptionsโ€‹

player.play() was hardcoding noReplace: false in the REST request regardless of what you passed in PlayOptions. It now reads the value from your options.


playlist.tracks loaded from the right sourceโ€‹

When loading a playlist, tracks were being remapped from result.tracks instead of the resolved playlist data. Playlists with tracks not directly on the top-level search result were loading empty.


startTime / endTime spreading fixed in play()โ€‹

startTime and endTime were blindly spread into the REST payload even when not provided, which could send undefined values to Lavalink. They are now conditionally included only when set.


REST null-guard on missing sessionIdโ€‹

getPlayer, updatePlayer, destroyPlayer, and updateSession now check that a sessionId is available before making the request. Previously calling these before a node session was established would produce a cryptic error instead of a clear one.


Priority node Collection-to-array conversionโ€‹

When enablePriorityMode was on, the priority node selector was calling .map() on a Collection directly instead of converting to an array first, causing it to pick the wrong node. This is now fixed.


Dependency changesโ€‹

  • axios removed; undici added as a direct dependency โ€” all HTTP requests now use undici fetch.
  • oceanic.js optional peer dependency bumped from 1.13.x to 1.14.x.

Questions?โ€‹

Join our Discord โ€” we're happy to help.