I want the discord.js bot to send a message when a command is executed, react on it and then catch all reactions from users to do certain stuff, like respond to them. No time li
Why not include the Collector in your command.js?
const time = 60000 //amount of time to collect for in milliseconds
receivedMessage.channel.send("Hello World")
.then(async function (message) {
await message.react('✅')
const filter = (reaction, user) => {
return //YOUR FILTER HERE;
};
const collector = message.createReactionCollector(filter, { time: time });
collector.on('collect', (reaction, reactionCollector) => {
//do stuff
});
});