Message Collector From Chat
I'm using an attachments and message content (made the bot to get it from private chat), to get the question and answer like this:
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!
- ✅
Marked as resolved by OPand I'm using this method because I made a lot of users able to apply their own question and answer.
you are creating a collector for every message on the channel?
what do you want to do?
yes to get the right answer within 10 seconds
I don't quite get what you're trying to do
The bot will take the attachment from chat1 and send it in chat2 then there's gonna be a collector in chat2 to get the correct answer (which will be the attachment's message content) within 10 seconds or the collector will stop, after that it's gonna take the second attachment in chat1 and so on until he sends all the attachments in the chat1
that's it
so you actually only need one collector, and the next is created after the last question in the queue "expires"
assuming there's a next one in the queue
exactly
well that's not really what your code is doing
your code is directly creating every collector at once
so they all expire at pretty much the same time