Get Bot amount in a server

Hey, I wanna get the number of all bots that are in a server. I was using
let bots = Array.from((await guild.members.fetch()).values()).filter(m => m.user.bot).length
let bots = Array.from((await guild.members.fetch()).values()).filter(m => m.user.bot).length
But this doesn't work. Not even dropping an error. Thanks in advance
6 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Flo
FloOP3y ago
I just checked my console and it seems like there is an error. Just arrived a bit late
Flo
FloOP3y ago
I disabled the GUILD_MEMBER intent due I am not allowed to use it (Discord Employees denied the application) How can I get the bots without that intent enabled?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Flo
FloOP3y ago
Hmm okay anyways. Thank you
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server