Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
Discord.js v13 bot won't join voice channels

Been troubleshooting this for multiple hours now. Issue is that I don't get any error logs from this as the code runs "fine". The bot just doesn't join a voice channel. I have copied the code almost 1:1 from a YouTube tutorial where it worked, and I have tried the official Discord guides as well, and both have the same results.

Here's my code:

const discordVoice = require('@discordjs/voice');

const player = discordVoice.createAudioPlayer();
const resource = discordVoice.createAudioResource(`/sounds/happy/${happySoundsRandom}`);
                    
const connection = discordVoice.joinVoiceChannel({
  channelId: channel.id,
  guildId: message.guild.id,
  adapterCreator: message.guild.voiceAdapterCreator,
});
                        
player.play(resource);
connection.subscribe(player);

console.log("Bot sent to voice")

When I run that by sending a message, I do get that console.log but no results on Discord side. I have readded the bot as an administrator, and made 100% sure the bot has voice channel permissions.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You have to use message.member.voice.channel.id instead of your channel.id

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!