I'm trying to create a collector but it doesn't work
it is not getting past the
collector.on('collect', i => {
part30 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!but it doesn't give error either
I give console.log(i) it doesn't even return anything
you create a collector on msg which you didnt show how you define
and also
i assule its supposed to go on your interaction
@wolvinny🌈
you never define msg
nor do you need to create a collector on it since you send your buttons with the interaction.reply
but I need to collect a response :_:
the message is set to msg
then create a collector on your interaction
how can I do this?
by resolving the promise <Interaction>.reply returns and calling createMessage.... on that
Oh i didnt see the .then, mb
Is the collector firing at all?
How do I see if the collector is firing?
@wolvinny🌈
If you aren't getting any errors, try to place
console.log
checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn morealso please dont ping me for every reply
collector return Promise { <pending> }
ah yeah
reoslve the promise
as a result?
console.log(i) does not reach it
Just await it
Where do I put the await?
when creating your collector
now it doesn't print anything when I give console.log(collector)
but does your collector fire
when I put the await as it is in the print it does not fire the code does not pass it
why did you change the way your created it?
Now your collector will just reutn a ButtonInteraction
sorry
the collector returned this, but when I react it does not return anything
@wolvinny🌈