[Solved] Giving multiple prompts over DM’s


You CAN use message collectors. However, you need to have it in a variable. Here is an example:

msg.author.send('some prompt').then(m => {
let i = 0;
var collector = m.channel.createMessageCollector(me => 
me.author.id === msg.author.id && me.channel === m.channel, {max: /*some number*/})
collector.on('collect', collected => {
if(collected.content === 'end') return collector.stop(); 
//basically if you want to stop all the prompts and do nothing
i +=1
if(i === 1) return collected.channel.send(/*something*/); //next prompt
if(i === 2) return collected.channel.send(/*something*/); //and so on until you get to the last prompt

})
collector.on('end', collectedMsgs => {
if(collectedMsgs.size < /*amount of prompts*/) {
return collectedMsgs.first().channel.send('Ended early, nothing was done.');
}
//some action you would do after all are finished
})
})

There may be some missing parentheses, you will have to add them.

1

solved Giving multiple prompts over DM’s