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

243
Visualizações
Discord.js v13 voice channel data is not updating

My Slash commands are registered and they come up in discord. Simplified version of my usage:

client.on('interactionCreate', async interaction => {
    if (!interaction.isCommand()) return;

    console.log(interaction.member.voice.channel);

    interaction.reply('done');
});

When running this it will always give the ouput from when i started the bot. For example if I join a channel and then start the bot, it gives the correct output, but if i then leave the channel it gives me the same output. If I'm not in a channel when I start the bot, the output correctly is null but if i join a channel it will again still be null until i restart the bot. Has anybody had the same problem / is my thinking wrong or does someone know a fix?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is not a problem with the slash commands functionality. You have to add the GUILD_VOICE_STATES intent to your client. This lets it detect updates to voice channels such as when you leave or join.

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