Collector problem

Hey guys, i'm trying to create a bot, i'm starting to learn collector, so i started with a guess the number commande but that don't work idk why, i need help plz guys !
9 Replies
d.js toolkit
d.js toolkit•6mo 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!
Lucas
Lucas•6mo ago
i'm french btw
Lucas
Lucas•6mo ago
SourceBin
guess the number
Instantly share your code with the world.
Lucas
Lucas•6mo ago
I did the console.log(randomNumber), to get the number but when i'm typing this number on my server, the bot won't answer to my answer
ItaChi
ItaChi•6mo ago
if you answer with a number, isNaN(m.content) will return false, so you should put ! before isNaN in collectionFilter
Lucas
Lucas•6mo ago
alr lemme try alr that work thanks, but i have another problem when the user found the number, i use collector.stop, but i created a collector ("end") so when a user find a number that return two messages
Lucas
Lucas•6mo ago
No description
Lucas
Lucas•6mo ago
the reason to stop the collector is the user who found the number but when the time is expired (collector ("end)) that send a message to the channel
d.js docs
d.js docs•6mo ago
:event: (event) Collector#end Emitted when the collector is finished collecting.
Want results from more Discord servers?
Add your server