Discord Player
Migrate from v7

v7 compatibility

Which v7 behavior carries over to v8, what changed, and what has no replacement.

You are reading the v8 docsDev

This page compares v7 with v8 behavior. A matching method name does not mean identical behavior, so check the notes.

What carries over

AreaIn v8
Player and player.play()Same names. Search with searchEngine. Queue defaults go in nodeOptions
player.nodesThe guild queue manager. create, get, resolve, delete, clear
Queue and historyAdd, remove, move, swap, copy, repeat, shuffle, bounded history, navigation
queue.node.play(track)Plays through the queue. With no argument it starts the next track
Queue helpersqueue.player, queue.deleted, queue.filters, queue.syncedLyricsProvider
ExtractorsBaseExtractor through the adapter. Priority, protocols, activate, and deactivate carry over
Lyricsplayer.lyrics.search() with optional plugins. Plain and synced results
Synced lyricsload, at, subscribe, and the v7 callbacks
Stream hooksGlobal, Player, and queue hooks. They keep v7 precedence
Context hooksuseMainPlayer, useQueue, and the others. The first active Player is the fallback
Voice policiesleaveOnEmpty, leaveOnEnd, leaveOnStop, cooldowns, and pauseOnEmpty
AutoplayUses the source's track.related and the v7 willAutoPlay callback
Track and PlaylistSame constructors and helpers, with versioned storage
Lifetimesplayer.signal and queue.signal abort as soon as destruction starts

What changed

AreaDifference
Audio and voiceRemedia owns decoding, filters, voice transport, and session recovery
Filters and volumeNamed presets or raw FFmpeg graphs. Volume is a percentage from 0 to 200. There are no DSP objects
Gateway eventsvoiceStateUpdate gives normalized states instead of discord.js VoiceState objects
Channel emptinessNeeds a resolver. Unknown is never treated as empty
Synced lyricsA line stays active until the next one starts. The v7 two-second closest-line rule is gone
willPlayTrackInformational only. Use resource hooks to change the source
willAutoPlaySame tracks and done contract
Metadata searchUses HTTP to a source host. Forwarding through Remedia is not implemented
Stage channelsRequesting to speak is up to your integration

What has no replacement

  • The decoded stream interceptor, demux and codec plumbing, and mutable output bitrate.
  • DSP objects such as the equalizer, reverb, and compressor, and their events.
  • Decoded StreamConfig on willPlayTrack, and the done latch.
  • Hooks on URL or file bytes when Remedia opens the media. onAfterCreateStream works with encoded Readable sources on embedded nodes only. Descriptor hooks work for remote operation sources.
  • Raw v7 stream-type and decoded audio resource options. Raw native playback takes Remedia media sources.

Detached Track and Playlist models keep their metadata, helpers, and storage. They do not hold a live audio resource or a queue. Use player.play(channel, trackOrPlaylist) and an explicit queue for seek and resource lifetime. Manager lookups return null when nothing exists.

Events

v7 eventv8
audioTrackAdd, audioTrackRemove, queueCreate, queueDeleteSame. No Remedia event is attached
playerStartFires when playback is audible. The Remedia event is last
playerFinishNatural completion. Updates history and progression
playerSkiptrack, reason, description, then the Remedia stop event
playerErrorerror, track, then the Remedia failure event
playerPause, playerResumeThe Remedia event. Stale events are ignored
playerStoptrack or null, then the Remedia event
volumeChangePrevious and new percentages, then the Remedia event
audioFiltersUpdatePrevious and new filter graphs, then the Remedia event
willPlayTrackInformational
emptyQueueThe queue ran out of tracks. Unrelated to who is in the channel
connection, connectionDestroyedVoice session connected or disposed
emptyChannel, channelPopulate, disconnectConfirmed membership changes and policy-owned actions
voiceStateUpdateprevious, current, and the raw packet
Other DSP eventsRemoved. Use audioFiltersUpdate

New in v8: willPrepareNextTrack, stageReady, stageFailed, stageInvalidated, transitionCancelled, sessionDisposed, voiceConnectionStateChange, sessionEvent, and the guild assignment events. See the event reference.

Continue reading

Run the checklist

On this page