I'm trying to make my Discord bot to detect when two or more similar messages are sent in a short time, and then send one message.
I'm having trouble understanding collectors so it just repeats the message over and over. Should I switch to await messages?
const filter = m => m.content.toLowerCase() == message.content.toLowerCase();
const collector = message.channel.createMessageCollector(filter, {max: 2, time: 6000});
collector.on('collect', m => {
message.channel.send(message.content);
});