Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

210
Vistas
How to get users in voice channel without cache in DiscordJS?

I'm trying to get all users inside voice channel in my server. When someone talks to bot in #general, I want to get the users inside Voice Channel 1. I'm using Node 17 and DiscordJS 13

This is my code:

message.guild.channels.fetch(channelID, {cache: false, force: true}).then(channels => {
    console.log(channels.members);
});

Also, I tried with this one:

let voiceChannel = client.guilds.cache.get(process.env.DISCORDJS_GUILD_ID).channels.cache.get(process.env.DISCORDJS_CHANNEL_ID);
let membersInChannel = voiceChannel.members;
console.log(membersInChannel);

But, it always return the voice channel users that joined when I start the node app. If someone leaves the voice channel, it keeps showing him in the console.log when I say something to the bot in #general. How can I achieve this?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda