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

101
Visualizações
Discord bot can't join voice channel in 13.1.0
const connection = await voice_channel.join();

Gives me the error:

voice_channel.join is not a function

I have @discordjs/voice installed and everything but it does not work in my code. Does anyone know how I fix this? The same is with my

voice_channel.leave();

which also just gives me the error that it's not a function. Can anyone provide a code example for how I fix this? And yes I have this in my code:

const voice_channel = message.member.voice.channel;
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In version 13 joining a voice channel has been changed. You can read all about it in the discord.js guide. To join a voice channel you must now use the joinVoiceChannel() command from discordjs/voice. It is used like this:

const connection = joinVoiceChannel({
  channelId: channel.id,
  guildId: channel.guild.id,
  adapterCreator: channel.guild.voiceAdapterCreator
})

The channel variable in this example is an instance of BaseGuildVoiceChannel.

To leave the channel just call .disconnect() or .destroy() on your connection object.

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