I am using discord.js message collectors. How can I check if no message was sent and give the error that time is up? Because as of now, there is no message sent if no messages were collected in the end event.
let filter = m => m.author.id === message.author.id
const collector = new MessageCollector(message.channel, filter, {max: 1, time: 1000 * 20})
collector.on('end', async m => { ...........
question from:https://stackoverflow.com/questions/65661515/how-do-i-get-the-size-of-the-collection