#Members in cache

3 messages · Page 1 of 1 (latest)

lean verge
#

For how long will d.js keep users in the cache memory? if I fetch all the members when starting the bot, will they remain in the cache until the bot shuts down? And if so, is it still in the cache when the user leaves the server and if so, can it be removed from there somehow?

fringe abyss
#

• 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.

winter forge
#

Unless you specify makeCache or sweepers settings in client constructor members will stay in cache as long as they are in the guild. With GuildMembers intent (which you need to fetch all members anyway) new members will be added on join and leaving members will be removed automatically.