Is it possible to have two collectors on the same message? Are there any examples?

Essentially I have a prompt for a user to edit a setting and they can click the "Enter response" button and get a TextInput modal, but I would also like a button on the prompt for another option. I would need a collector running to accept the text modal input if it is clicked and stop if the button is clicked and vice versa.
10 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Stqlth
Stqlth2y ago
Example of the Enter Response button:
Stqlth
Stqlth2y ago
I would want a button next to it
MrMythical
MrMythical2y ago
You can't have a button on a modal oh by prompt you meant the original message?
Stqlth
Stqlth2y ago
yes
MrMythical
MrMythical2y ago
Well sure you can do it, just use .stop() on the other collector in the end event
Stqlth
Stqlth2y ago
oh word that's easier than I thought
MrMythical
MrMythical2y ago
Make sure to set and check the reason, so it doesn't just trigger both
d.js docs
d.js docs2y ago
method Collector#stop() Stops this collector and emits the end event.
Stqlth
Stqlth2y ago
👍