Get total bot without enabling GatewayIntentBits.GuildMember

Hi — is there any way to get the total number of bots in a Discord server without enabling GatewayIntentBits.GuildMembers? Right now I only have interaction.guild.memberCount to get total all member. Any suggestions?
15 Replies
d.js toolkit
d.js toolkit4w ago
Chtholly (クトリ)
I don't think that that's possible because memberCount gives you human + bots you don't have permission to know if they are member or bot without the GuildMember intent
Inky
Inky4w ago
You can’t
Cryptic
Cryptic4w ago
Just add it…
Unknown User
Unknown User4w ago
Message Not Public
Sign In & Join Server To View
Cryptic
Cryptic4w ago
GatewayIntentsBits.GuildMembers…
Unknown User
Unknown User4w ago
Message Not Public
Sign In & Join Server To View
Inky
Inky4w ago
They’re suggesting to just add the intent because it’s not possible otherwise
Mafia
Mafia4w ago
Is the approximate member count able to be retrieved from the guild object without the member intent?
d.js docs
d.js docs4w ago
:property: Guild#memberCount discord.js@14.24.0 The full amount of members in this guild
Inky
Inky4w ago
That would include bots and users tho
Mafia
Mafia4w ago
I see. Misread the question as get member count without guild member intent
Inky
Inky4w ago
As a wise man once said, "it's time to live and let die." So let’s allow this thread to move into the graveyard
...
...4w ago
Sao lại muốn một thứ sinh ra để làm việc đấy không thực thi function đó? =)). Intents đấy là để interact với client mà
d.js toolkit
d.js toolkit3w ago
The thread owner has marked this issue as solved.

Did you find this page helpful?