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 toolkit10mo 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ãozinho10mo ago
but it doesn't give error either I give console.log(i) it doesn't even return anything
treble/luna
treble/luna10mo 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ãozinho10mo ago
No description
Joãozinho
Joãozinho10mo ago
@wolvinny🌈
treble/luna
treble/luna10mo 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ãozinho10mo ago
but I need to collect a response :_: the message is set to msg
treble/luna
treble/luna10mo ago
then create a collector on your interaction
Joãozinho
Joãozinho10mo ago
how can I do this?
treble/luna
treble/luna10mo 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ãozinho10mo ago
How do I see if the collector is firing? @wolvinny🌈
d.js docs
d.js docs10mo 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/luna10mo ago
also please dont ping me for every reply
Joãozinho
Joãozinho10mo ago
collector return Promise { <pending> }
treble/luna
treble/luna10mo ago
ah yeah reoslve the promise
Joãozinho
Joãozinho10mo ago
as a result?
Joãozinho
Joãozinho10mo ago
No description
Joãozinho
Joãozinho10mo ago
console.log(i) does not reach it
treble/luna
treble/luna10mo ago
Just await it
Joãozinho
Joãozinho10mo ago
Where do I put the await?
treble/luna
treble/luna10mo ago
when creating your collector
Joãozinho
Joãozinho10mo ago
now it doesn't print anything when I give console.log(collector)
treble/luna
treble/luna10mo ago
but does your collector fire
Joãozinho
Joãozinho10mo 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ãozinho10mo ago
No description
treble/luna
treble/luna10mo ago
why did you change the way your created it? Now your collector will just reutn a ButtonInteraction
Joãozinho
Joãozinho10mo ago
sorry
Joãozinho
Joãozinho10mo ago
No description
Joãozinho
Joãozinho10mo ago
No description
Joãozinho
Joãozinho10mo ago
the collector returned this, but when I react it does not return anything @wolvinny🌈