So i used your code from the other issue to do multiple question and answers, how will i do the command in a guild then it send a message and the collector in dm.
const questionList = ['First question', 'Second question'];
const responseList = await questionList.reduce(
async (previousQuestions, currentQuestion, index) => {
// responses will contain an array of the previous responses
const responses = await previousQuestions;
// Here you could use the index variable to check in which question you
// are at and use the responses array to change the question accordingly.
let question = currentQuestion;
const messageCollection = await Promter.message(message.channel, {
question,
userId: message.author.id,
timeout: 5000,
max: 1,
});
// Get the first message from the returned collection
const msg = messageCollection.first();
// If the user timed out the collection will be empty
const response = msg ? msg.content : null;
return [...responses, response];
},
[],
);
message.channel.send('Response: ' + responseList.join(`, `));```