node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */)

Hey! i have an :
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<_Collection>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<_Collection>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
This is my code, if u can help me !
4 Replies
d.js toolkit
d.js toolkit14mo ago
- 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!
duck
duck14mo ago
sounds like collector.next is rejecting given that you await the next message for every message, this is guaranteed to happen for the last collected message
Melio
MelioOP14mo ago
what i have to do ?
duck
duck14mo ago
catch the error, or maybe refactor so that setup begins immediately rather than having a seemingly unnecessary start message
Want results from more Discord servers?
Add your server