receiving InteractionCollectorError after assumed fix

https://srcb.in/ldSaMiZGcn I assumed by adding the .catch, the bot would stop crashing.
23 Replies
d.js toolkit
d.js toolkit2w 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! - Marked as resolved by OP
mixᴎ
mixᴎ2w ago
In your code where does the print(err) coming from?
MYA
MYAOP2w ago
huh wdym the print never runs Oh I forgot to send the error my bad
C:\Users\yusuf\Documents\programming projects\discordbots\pixel-media\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:311
else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason));
^

Error [InteractionCollectorError]: Collector received no interactions before ending with reason: time
at InteractionCollector.<anonymous> (C:\Users\yusuf\Documents\programming projects\discordbots\pixel-media\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:311:21)
at Object.onceWrapper (node:events:633:26)
at InteractionCollector.emit (node:events:530:35)
at InteractionCollector.stop (C:\Users\yusuf\Documents\programming projects\discordbots\pixel-media\node_modules\discord.js\src\structures\interfaces\Collector.js:233:10)
at Timeout.<anonymous> (C:\Users\yusuf\Documents\programming projects\discordbots\pixel-media\node_modules\discord.js\src\structures\interfaces\Collector.js:96:61)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7) {
code: 'InteractionCollectorError'
}
C:\Users\yusuf\Documents\programming projects\discordbots\pixel-media\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:311
else reject(new DiscordjsError(ErrorCodes.InteractionCollectorError, reason));
^

Error [InteractionCollectorError]: Collector received no interactions before ending with reason: time
at InteractionCollector.<anonymous> (C:\Users\yusuf\Documents\programming projects\discordbots\pixel-media\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:311:21)
at Object.onceWrapper (node:events:633:26)
at InteractionCollector.emit (node:events:530:35)
at InteractionCollector.stop (C:\Users\yusuf\Documents\programming projects\discordbots\pixel-media\node_modules\discord.js\src\structures\interfaces\Collector.js:233:10)
at Timeout.<anonymous> (C:\Users\yusuf\Documents\programming projects\discordbots\pixel-media\node_modules\discord.js\src\structures\interfaces\Collector.js:96:61)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7) {
code: 'InteractionCollectorError'
}
the error just displays but not through the print
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
yeah ik that, I put that there so I could replicate the issue without having to wait a long time I thought by putting the catch, the bot would carry on running after the error rather than crashing I left out this by accident
[nodemon] app crashed - waiting for file changes before starting..
[nodemon] app crashed - waiting for file changes before starting..
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
wdym it does tho
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
oh ok, I thought u were getting confused and thinking the bot was still running after the error . hang on literally nothing
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
this error
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
BRO I got confused with python ahhh, thats embarassing
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
lmfao nah yeah but the error still occurs even though iv done it correctly now
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
I just dont want my bot to die hang on
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
I changed it to
.catch((err) => {
console.log(`error has occured ${err}`)
})
.catch((err) => {
console.log(`error has occured ${err}`)
})
and it still returns the same error so the error message in the console is not coming from this
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP2w ago
It's still crashing
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
MYA
MYAOP7d ago
Oh hang on

Did you find this page helpful?