#Get correct count of all members that are not offline
4 messages · Page 1 of 1 (latest)
Imho it’s a mistake that discord exposes invisible state at all to bots. Since the purpose of invisible is appearing as offline for all intents and purposes…
Do you have all members cached? As in did you <Guild>.members.fetch() once somewhere?
That is API spam… you don’t need to fetch guilds at all, they are always cached with Guilds intent (but in your code the fetch isn’t forced so is got from cache anyway).
But the fetching of all members only needs to happen once on ready. After that the cache gets updated through gateway events anyway.