1You need to use client.setActivity() and then use the client.guilds.cache.size value.
2For example:
3
4client.setActivity(`Currently in ${client.guilds.cache.size} servers`);
1module.exports.run = async (client, message, arguments) => {
2 const guild = client.guilds.get("566596189827629066");
3 setInterval(function () {
4 var memberCount = guild.members.filter(member => !member.user.bot).size;
5 var memberCountChannel = client.channels.get("626462657817477131");
6 memberCountChannel.setName(`${guild.name} has ${memberCount} members!`);
7 }, 1000);
8};