#Guild .memberCount vs .approximateMemberCount?

18 messages · Page 1 of 1 (latest)

shut talon
#

What is the difference between a guild's memberCount and approx MC? I don't see a memberCount in the actual API-provided Guild, and additionally the approximate count is for some reason null? I have the Guilds & GuildMembers intents enabled which I presume are the needed ones.

stone bisonBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
shut talon
#
└─ mw-analytics@workspace:.
   └─ discord.js@npm:14.14.1 (via npm:^14.14.1)
#

Node 18.17.0

            this.container.metricsManager.writePoint(
                new Point("member-count").intField("members", client.guilds.cache.get(env.MAIN_GUILD_ID)!.approximateMemberCount)
            );

The error is the Influx client showing me that the guild's .approximateMemberCount is null

#

(ping for replies please)

graceful tendon
shut talon
shut talon
#

.memberCount exists though Thinkeng

graceful tendon
shut talon
graceful tendon
shut talon
graceful tendon
#

Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold

#

Ah, nvm, you‘re right for 75k and more members

#

If your bot does not have the GUILD_PRESENCES Gateway Intent, or if the guild has over 75k members, members and presences returned in this event will only contain your bot and users in voice channels.