Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!