Member count help

I have the following code but I want it to exclude bots, any hep would be appreciated. Thanks!

client.on('ready' , (c) => { let memberCount = 0; client.guilds.cache.forEach(g => { memberCount = memberCount + g.memberCount; }); client.user.setActivity({ name: memberCount + " Members", type: ActivityType.Watching }); });
Was this page helpful?