Example

View the examples for a basic audio setup

Example normal audio

const player = client.createPlayer();

const channel = message.member.voice.channel;
const connection = await client.createVoice(channel);

const song = await client.createAudioSource("SONG-URL");

player.play(song);
connection.subscribe(player);

Example YouTube audio

const player = client.createPlayer();

const channel = message.member.voice.channel;
const connection = await client.createVoice(channel);

const song = await client.createAudioSource(ytdl("SONG-URL"));

player.play(song);
connection.subscribe(player);

Last updated