0

I'm making a discord bot with discord.js and whenever I run this command it sets the user cache as 3-4. But with 74 servers it was around 700 users but not its at 3-4 how can I fix this using caching? I'm relatively new to .js developing and need help.

console.log(`Logged in as ${client.user.tag}!`);
console.log(`Watching ${client.guilds.cache.size} servers!`)
console.log(`Watching ${client.users.cache.size} users!`)
console.log(`Watching ${client.channels.cache.size} channels!`)
Toasty
  • 1,850
  • 1
  • 6
  • 21
RG2N
  • 17
  • 6
  • Does this answer your question? [None of my discord.js guildmember events are emitting, my user caches are basically empty, and my functions are timing out?](https://stackoverflow.com/questions/64559390/none-of-my-discord-js-guildmember-events-are-emitting-my-user-caches-are-basica) – Lioness100 Jun 08 '21 at 01:35
  • 3-4 is number of users you want to cache ? – HellCatVN Jun 08 '21 at 02:38

1 Answers1

0

Have you tried enabling the Privileged Intents?

To do this, you have to go to the Developer Portal. You'll then have to navigate to Privileged Gateway Intents in the Bot section and you'll have to activate these:

Privileged Gateway Intents

However, it is that simple only if your bot is not yet more than in 100 servers. But as soon as you reach this mark of 100 servers and you need to verify your bot / or it already is, you have to request the activation.

Hope this will help you out :)


References

Toasty
  • 1,850
  • 1
  • 6
  • 21