© 2026 Hedgehog Software, LLC
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); }); })
Join the Discord to ask follow-up questions and connect with the community
Support server for discord.js, a Node.js module to interact with Discord's apps API.
57,666 Members