Default `time` value for `awaitMessageComponent` ?
Hi, the
time value in awaitMessageComponent is optional, but I cannot find any indication of what the default value is ? Thanks10 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!There isn't one, it's a required option
afaik its only required in modal collectors. this one just runs until the process exits

Nice, thanks !
:interface: AwaitMessageComponentOptions
discord.js@14.19.3
An object containing the same properties as CollectorOptions, but a few more:It's at least typed as non nullable
But if you are looking for something more persistent, you should really consider just listening to the interactionCreate event
All collectors are designed to be temporary
Yeah but that's more complicated to code
I mean no I don't want it to be persistent, I just want the user to be able to take their time, so removing expiration works for me.
Maybe it's just personal preference but something still irks me about an indefinitely hanging promise that I'd still personally use the event based collector 😅
yeah I'd say it would even classify as a memory leak
one user could even intentionally create a bunch of unresolved promises if they manage to know you're waiting without a timeout
and it could slow down and/or drain resources if done enough times, wouldn't even need to be just one user, could be multiple unintentionally over a period of time