Bot joins audio channel, turns green, still no sound

There is no error thrown, I don't see anything wrong. Mostly copied the guide.
client.channels.fetch(TESTCHANNEL).then(vc => {
const voiceChannelConnection = joinVoiceChannel({
channelId: TESTCHANNEL,
guildId: vc.guild.id,
adapterCreator: vc.guild.voiceAdapterCreator,
});

const musicPlayer = createAudioPlayer();
musicPlayer.on('error', error => {
console.error(`Error with audio player: ${error.message} with resource ${error.resource.metadata.title}`);
});


var currentlyPlaying = createAudioResource(path.join(__dirname,'music/defenders-of-oasis-village.mp3'));
//var currentlyPlaying = createAudioResource('music/defenders-of-oasis-village.mp3');
//currentlyPlaying.volume.setVolume(1);
musicPlayer.play(currentlyPlaying);
voiceChannelConnection.subscribe(musicPlayer);
console.log('playing?')

currentlyPlaying.playStream.on('error', error => {
console.error('Error:', error.message, 'with track', resource.metadata.title);
});
})
client.channels.fetch(TESTCHANNEL).then(vc => {
const voiceChannelConnection = joinVoiceChannel({
channelId: TESTCHANNEL,
guildId: vc.guild.id,
adapterCreator: vc.guild.voiceAdapterCreator,
});

const musicPlayer = createAudioPlayer();
musicPlayer.on('error', error => {
console.error(`Error with audio player: ${error.message} with resource ${error.resource.metadata.title}`);
});


var currentlyPlaying = createAudioResource(path.join(__dirname,'music/defenders-of-oasis-village.mp3'));
//var currentlyPlaying = createAudioResource('music/defenders-of-oasis-village.mp3');
//currentlyPlaying.volume.setVolume(1);
musicPlayer.play(currentlyPlaying);
voiceChannelConnection.subscribe(musicPlayer);
console.log('playing?')

currentlyPlaying.playStream.on('error', error => {
console.error('Error:', error.message, 'with track', resource.metadata.title);
});
})
1 Reply
skeddles
skeddlesOP3y ago
"dependencies": {
"@discordjs/rest": "^0.1.0-canary.0",
"@discordjs/voice": "^0.11.0",
"data-store": "^4.0.3",
"discord-api-types": "^0.22.0",
"discord.js": "^13.9.0",
"ffmpeg-static": "^5.0.2",
"glob": "^7.1.6",
"libsodium-wrappers": "^0.7.10",
"node-fetch": "^2.6.1"
},
"dependencies": {
"@discordjs/rest": "^0.1.0-canary.0",
"@discordjs/voice": "^0.11.0",
"data-store": "^4.0.3",
"discord-api-types": "^0.22.0",
"discord.js": "^13.9.0",
"ffmpeg-static": "^5.0.2",
"glob": "^7.1.6",
"libsodium-wrappers": "^0.7.10",
"node-fetch": "^2.6.1"
},
Want results from more Discord servers?
Add your server