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
- 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!i'm french btw
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
if you answer with a number,
isNaN(m.content)
will return false
, so you should put !
before isNaN
in collectionFilteralr 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
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