I was making a member count command for my bot which would show the Total, Members, Bots of the server. I have given my code below which works perfectly but the problem is, the bot shows the members as 1 and bots as 2 while the total members is correct.
    if (message.content.startsWith('$membercount')) {
      const memberCount = message.guild.members.cache.filter(member => !member.user.bot).size;
      const totalCount = message.guild.memberCount
      const botCount = message.guild.members.cache.filter(member => member.user.bot).size;
      const embed = new Discord.MessageEmbed()
      .setTitle(`${message.guild}`)
      .addField('Total', totalCount)
      .addField('Members', memberCount)
      .addField('Bots', botCount)
      message.channel.send(embed)
    }