case 'tutorial': const questions = [ 'test 1', 'test 2', 'test 3', 'test 4', 'test 5', 'test 6', 'test 7', ] let counter = 0 const filter = m => m.author.id === message.author.id const collector = new Discord.MessageCollector(message.channel, filter, { max: questions.length, time: 1000 * 15 }) message.channel.send(questions[counter++]) collector.on('collect', m => { if (counter < questions.length) { m.channel.send(questions[counter++]) } }) collector.on('end', collected => { let counter = 0 collected.forEach((value) => { console.log('worked') }) }) break;