Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

242
Visualizações
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 Respostas
Responde à pergunta

0

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

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda