I'm trying to create a collector but it doesn't work

it is not getting past the collector.on('collect', i => { part
No description
30 Replies
d.js toolkit
d.js toolkit17mo 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!
Joãozinho
JoãozinhoOP17mo ago
but it doesn't give error either I give console.log(i) it doesn't even return anything
treble/luna
treble/luna17mo ago
you create a collector on msg which you didnt show how you define and also i assule its supposed to go on your interaction
Joãozinho
JoãozinhoOP17mo ago
No description
Joãozinho
JoãozinhoOP17mo ago
@wolvinny🌈
treble/luna
treble/luna17mo ago
you never define msg nor do you need to create a collector on it since you send your buttons with the interaction.reply
Joãozinho
JoãozinhoOP17mo ago
but I need to collect a response :_: the message is set to msg
treble/luna
treble/luna17mo ago
then create a collector on your interaction
Joãozinho
JoãozinhoOP17mo ago
how can I do this?
treble/luna
treble/luna17mo ago
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?
Joãozinho
JoãozinhoOP17mo ago
How do I see if the collector is firing? @wolvinny🌈
d.js docs
d.js docs17mo ago
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 more
treble/luna
treble/luna17mo ago
also please dont ping me for every reply
Joãozinho
JoãozinhoOP17mo ago
collector return Promise { <pending> }
treble/luna
treble/luna17mo ago
ah yeah reoslve the promise
Joãozinho
JoãozinhoOP17mo ago
as a result?
Joãozinho
JoãozinhoOP17mo ago
No description
Joãozinho
JoãozinhoOP17mo ago
console.log(i) does not reach it
treble/luna
treble/luna17mo ago
Just await it
Joãozinho
JoãozinhoOP17mo ago
Where do I put the await?
treble/luna
treble/luna17mo ago
when creating your collector
Joãozinho
JoãozinhoOP17mo ago
now it doesn't print anything when I give console.log(collector)
treble/luna
treble/luna17mo ago
but does your collector fire
Joãozinho
JoãozinhoOP17mo ago
when I put the await as it is in the print it does not fire the code does not pass it
Joãozinho
JoãozinhoOP17mo ago
No description
treble/luna
treble/luna17mo ago
why did you change the way your created it? Now your collector will just reutn a ButtonInteraction
Joãozinho
JoãozinhoOP17mo ago
sorry
Joãozinho
JoãozinhoOP17mo ago
No description
Joãozinho
JoãozinhoOP17mo ago
No description
Joãozinho
JoãozinhoOP17mo ago
the collector returned this, but when I react it does not return anything @wolvinny🌈
Want results from more Discord servers?
Add your server