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

199
Visualizações
How to get the memberCount of every guild that a client is in?

I've seen many many similar questions, but they all needed the ID of a specific guild to get the memberCount of that guild, not all the guilds. I want to find out how to get the memberCount of all the guilds that the bot is in. It'll be better if the memberCount isn't going to count the guilds' bots (however that I know how to make a filter for that).

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

0

As long as you don't want your bot to be verified and you don't use that data maliciously, it can be easily done:

Client.guilds.cache.forEach(guild => {
  const members = guild.members.cache.filter(member => !member.user.bot);
  console.log(guild.name + ': ' + members.size);
});

For this you'll need to have the GUILD_MEMBERS and GUILD_PRESENCES intents to work.

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