Upgrading
The shortcut methods are gone
Section titled “The shortcut methods are gone”They were deprecated in v5.2. Use the queue of the guild instead.
// ❌ Removed in v6distube.pause(guildId);distube.resume(guildId);distube.stop(guildId);distube.setVolume(guildId, 50);distube.skip(guildId);distube.previous(guildId);distube.shuffle(guildId);distube.jump(guildId, 2);distube.setRepeatMode(guildId, 1);distube.toggleAutoplay(guildId);distube.addRelatedSong(guildId);distube.seek(guildId, 30);
// ✅ The queueconst queue = distube.getQueue(guildId);await queue.pause();await queue.resume();await queue.stop();queue.setVolume(50);await queue.skip();await queue.previous();await queue.shuffle();await queue.jump(2);queue.setRepeatMode(1);queue.toggleAutoplay();await queue.addRelatedSong();await queue.seek(30);The getters of the queue are gone
Section titled “The getters of the queue are gone”// ❌ Removed in v6queue.isPlaying();queue.isPaused();queue.playing;
// ✅ The propertiesqueue.paused;queue.isActive; // false once the queue is stoppedThe plugin types are merged
Section titled “The plugin types are merged”InfoExtractorPlugin and PlayableExtractorPlugin now extend ExtractorPlugin and only change
their type. A plugin that cannot play its own songs declares it:
// ❌ Beforeclass MyPlugin extends InfoExtractorPlugin { async createSearchQuery(song) { return `${song.name} ${song.uploader.name}`; }}
// ✅ Nowclass MyPlugin extends ExtractorPlugin { readonly playable = false;
async createSearchQuery(song) { return `${song.name} ${song.uploader.name}`; }}The proxy of a song tries every plugin
Section titled “The proxy of a song tries every plugin”DisTube used to look for a playable version of a song in a single plugin. It now tries every searchable plugin, in the order they were registered, until one of them has a result. The metadata of the original song is kept.
The plugins can find each other
Section titled “The plugins can find each other”// ❌ Beforeconst plugin = distube.plugins.find((p) => p.constructor.name === "MyPlugin");
// ✅ Nowconst plugin = distube.getPlugin("my-source");The plugins have a lifecycle
Section titled “The plugins have a lifecycle”class MyPlugin extends ExtractorPlugin { async init(distube) { super.init(distube); // The network calls, the sessions, the timers... }
async destroy() { // Release everything. }}destroy() is called when the DisTube instance is destroyed, and when a plugin is replaced at
runtime.
The search returns a result
Section titled “The search returns a result”// ❌ Before: the search of the client had to be patched by handconst results = await distube.search(query, { limit: 25 });
// ✅ Nowconst result = await distube.search(query, { limit: 25 });result.songs; // the songsresult.sources; // the plugins that contributedThe result of a plugin is a SearchResult too, so a result can be played without resolving it a
second time.
The errors have their own codes
Section titled “The errors have their own codes”import { PluginError, PluginErrorCode } from "@kattowo/distube";
throw new PluginError(PluginErrorCode.NOT_FOUND, "This track does not exist.");The client can wait for the plugins
Section titled “The client can wait for the plugins”// ✅ Nowconst distube = await DisTube.create(client, { plugins: [new MyPlugin()] });The voice connection requires DAVE
Section titled “The voice connection requires DAVE”Discord made the DAVE end-to-end encryption mandatory in March 2026. Install @discordjs/voice 0.19.1
or later; DisTube enables DAVE on every connection. An older voice package fails with
VOICE_CONNECT_FAILED after 30 seconds, even when a transport encryption library is installed.
DisTube does not include any music source any more: they are plugins. The option that used to turn a source on is gone, and the sources are given to the client instead:
// ❌ Before: an option of the clientconst distube = new DisTube(client, { /* the option of the source */ });
// ✅ Nowconst distube = new DisTube(client, { plugins: [new MyPlugin()] });The play() method takes a voice channel and an options object, and it throws instead of
emitting an error.
// ❌ Beforedistube.play(message, "query");
// ✅ Nowawait distube.play(message.member.voice.channel, "query", { message, member: message.member,});The error event changed its arguments.
// ❌ Beforedistube.on("error", (channel, error) => {});
// ✅ Nowdistube.on(Events.ERROR, (error, queue, song) => {});The filters moved to the queue.
// ❌ Beforedistube.filters.set(["nightcore"]);
// ✅ Nowqueue.filters.set(["nightcore"]);