Discord Player
Remedia runtime

Node capacity and selection

Inspect Remedia nodes and choose where a guild plays.

You are reading the v8 docsDev

A node hosts many independent sessions. A guild queue uses one session, and later tracks on that queue reuse it.

Inspect nodes

const remedia = player.getRemedia();

console.log(player.nodeSnapshots);
console.log(remedia.nodes);

Audio node state lives on player.remedia and player.nodeSnapshots. player.nodes is the queue manager.

Choose a node for a queue

const queue = await player.createQueue(guildId, {
  selectNode(nodes) {
    return nodes[0]!.id;
  },
});

Without selectNode, Remedia places a new guild on the healthy node with the lowest load compared to its capacity. It breaks ties by node ID. Degraded, full, or disconnected nodes and nodes without a required plugin host are skipped.

selectNode replaces that choice:

  • It receives only the eligible nodes.
  • It runs once, when the guild's first session is created. The returned ID stays for that session.
  • It is skipped when you pass nodeId explicitly or the guild is already assigned.
  • Remedia still rejects an unknown or unavailable ID.

The example returns the first node to stay short. It is not a placement strategy.

You can also pin a node when playing:

await player.play(channel, query, { nodeId: 'audio-1' });

Crossfade placement

Crossfade is requested only when the chosen node supports it. Without selectNode or a pinned node, it is requested only if every eligible node supports it. Otherwise the queue plays without crossfade and emits a debug message. In a mixed pool, pin a node or provide selectNode.

Embedded or remote

ConcernEmbeddedRemote
ProcessIn the botSeparate service
FFmpeg librariesBot machineServer machine
ControlNative bindingAuthenticated WebSocket
Local ReadableSupportedNot supported
Failure isolationShares the bot processIndependent
ScalingScale the whole botAdd audio nodes

Server administration

These commands run on the server machine. They are not methods on player.getRemedia():

remedia-server --list
remedia-server doctor --config ./remedia.config.json --env-file .env

--list shows local servers with their player counts, connections, memory, and health. doctor checks the FFmpeg 9 libraries and the configuration.

For metrics and debugging, see Remedia's observability documentation. Keep media locations and credentials out of logs.

Continue reading

Voice recovery

On this page