0

Why is it not counting members correctly? (Also not a complete list of participants with names.)

console.log(`Number of participants on the server: ${msg.guild.members.cache.size}`)
msg.guild.members.cache.forEach(element => {
  console.log(element.user.username)
});

Look at the screenshot

Or Assayag
  • 5,662
  • 13
  • 57
  • 93
  • Maybe there are other conditions to check the active users or those user's data is not in the cache, can you check the code? with the provided information, it's not possible for us to help you, you need to update the question. – kgangadhar Nov 27 '20 at 16:04
  • 1
    see if [this](https://stackoverflow.com/questions/64739350/discord-js-bot-welcomes-member-assign-a-role-and-send-them-a-dm/64739684#64739684) solves your problem – Worthy Alpaca Nov 27 '20 at 16:37
  • Does this answer your question? [Discord.js Bot Welcomes Member, Assign a Role and send them a DM](https://stackoverflow.com/questions/64739350/discord-js-bot-welcomes-member-assign-a-role-and-send-them-a-dm) – Tyler2P Nov 27 '20 at 20:20

0 Answers0