Discord Player
API reference

Remedia configuration

Node options for embedded and remote playback.

You are reading the v8 docsDev

Pass nodes to the Player with nodes. This is separate from player.nodes, the queue manager.

Embedded node

nodes: [{ id: 'local', type: 'embedded', capacity: 8 }];
FieldDescription
idUnique node name
type'embedded'
capacityMaximum simultaneous guild sessions. Default 64

It uses @remedia/node in your process and needs the FFmpeg 9 shared libraries on that machine.

Remote node

nodes: [
  {
    id: 'audio-1',
    type: 'remote',
    url: 'remedias://audio.example.com',
    auth: { username: 'bot', password: process.env.REMEDIA_PASSWORD! },
  },
];
FieldDescription
idUnique node name
type'remote'
urlremedia://, remedias://, ws://, or wss://. The path defaults to /v1/ws
auth{ username, password } for HTTP Basic authentication. Do not log it
capacityOverrides the server's reported player maximum for selection

The bot machine does not need FFmpeg when it only uses remote nodes. Use TLS and server-side access limits. See remote playback.

Client options

These Player options go to the Remedia client:

OptionDefaultDescription
requestTimeoutMs15000Timeout for ordinary requests
maxPendingRequests128Concurrent requests per remote node

Voice joins use a longer deadline. connectTimeoutMs on queue.connect() or player.play() sets the overall initial join deadline, and channel moves keep their own.

Inspect nodes

await player.initialize(botUserId);

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

Placement

A guild stays on the node it was assigned to. A queue's selectNode option influences the first placement. See node capacity and selection.

For session migration, event generations, and the protocol, see the Remedia client reference.

Continue reading

Troubleshooting

On this page