How can discord.js cache all users, channels, guilds into Collection?

Title
10 Replies
d.js toolkit
d.js toolkit17mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
chewie
chewie17mo ago
Please elaborate your question a bit more
Louis -v-
Louis -v-OP17mo ago
Like how discord.js does so that instead of fetching data, users can use cache instead? Like guilds.cache for example?
chewie
chewie17mo ago
The client receives the data based on intents If you have the Guilds intent, channels will be sent at the startup Same for roles etc., but not for users
Louis -v-
Louis -v-OP17mo ago
so users need to be fetched before?
treble/luna
treble/luna17mo ago
you cannot fetch all users
Louis -v-
Louis -v-OP17mo ago
yeah ik, but how users.cache work? is that members data from the guilds?
treble/luna
treble/luna17mo ago
thats just cached users not members
chewie
chewie17mo ago
That contains users your bot interacted with in any way, like receiving events from them
Louis -v-
Louis -v-OP17mo ago
ty
Want results from more Discord servers?
Add your server