#client.users.cache.size
41 messages · Page 1 of 1 (latest)
Getting your bot's member count
• client.users.cache.size is unreliable because it will only return cached users
• The preferred method is using collection.reduce() on client.guilds.cache
client.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)
to get the online presence of members, you need the GUILD_PRESENCES / GuildPresences intent and checking <GuildMember>.presence.status
otherwise, that picture isn't really showing me what the problem is
if you want to get the total member count in a server, that would be <Guild>.memberCount
before documentation
documentation of what
message content and server members intent
what does that have to do with the member count
But now nothing comes about the number of people
you're not giving a lot of context here
number of people for the server? bot's member count?
yes
which one
2
it's this
you dont need the guild members intent to get your bot's total member count
The number of online members and the number of bot users of guilds
before documentation As if they are working normally, after documenting, the problem appeared. I just want to do it or not
this is for the online members
and i sent the tag for the bot's member count as well
i dont know what else the problem is
you also won't be granted the presence intent if you are just going to be displaying online members
How do I authenticate this Intente What is required
i already told you what intents you need
you dont need the presence intent to only display online users
as that is not considered valid when applying
is your bot verified?
yes
okay so then you can choose to apply for the presence intent, but like i said before, you won't be given the intent just to show the total users that are online. that is for your personal liking, which is not what the intent is meant to use used for. you use intents with valid reasons of needing them
How do I show it?
show what
this ?
by putting that in your code and displaying it on discord such as sending it in a message, embed, etc.
seems like you already show a number of members, so i dont really know what the issue is with updating code
hope that clears things up for you. if you have more intent related questions, ask in the discord-developers server