I can't make a filter.
The bot shows 6 members of the server , with the bot.
How can I make the bot not be included in this number
const guild = client.guilds.cache.get("74721732.........");
setInterval(function () {
var memberCount = guild.members.filter(member => !member.user.bot).size;
var memberCountChannel = client.channels.cache.get("81358139.........");
memberCountChannel.setName(`Members: ${memberCount}`);
}, 1000);
Read more here: https://stackoverflow.com/questions/66326215/how-to-make-a-filter-from-bots-discord-js
Content Attribution
This content was originally published by Andryxa at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.