I've been working through this for about a week, and I am officially lost. Looking for answers online to how I can adjust this command for /riddle to be daily, and to assign a role upon successfully answering. Any help would be appreciated as I've spent so many hours on this, and now the project is looking for a hard deadline and I'm not able to break through this wall. Please help!
async execute(interaction, message) {
const item = quiz[Math.floor(Math.random() * quiz.length)];
const filter = response => {
return item.answers.some(answer => answer.toLowerCase() === response.content.toLowerCase());
};
interaction.reply(item.question, { fetchReply: true })
.then(() => {
interaction.channel.awaitMessages({ filter, max: 1, time: 30000, errors: ['time'] })
.then(collected => {
interaction.followUp(`${collected.first().author} got the correct answer!`);
})
.catch(collected => {
interaction.followUp('Looks like you missed the answer this time, come back tomorrow for another chance to find your Fortune! with our daily riddles!');
});
});
},
};