Disabling threads sweeper
Trying to disable the threads sweeper but having trouble telling whether it was done correctly.
Client constructor:
Logging client.sweepers gives:
Was this the correct way to do it?
intervals.threads
is null
like the intervals for sweepers of other types, but does that mean "never sweep"? I still see a lifetime
in the options but unclear if interval being null makes that moot.
Also tried:
2 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!My use case is that I have a function that relies on all threads in a forum being cached. The only way I can think of to make sure that the list is always there is to fetch them each time, but that means some redundant API requests if the function is called again too soon and while the threads are still cached. Hoping that disabling the sweeper would let me fetch the threads once the first time the function is called and then never again for the rest of the session
Okay cool, thank you for confirming