Select Menu Collector
I'm struggling with collecting the response from my select menu. I don't get any errors in the terminal, I only get the "Interaction has failed" message on Discord after selecting a value.
This is the code:
This is the code:
const selectResponseMsg = await interaction.editReply({ embeds: [embed], components: [row], fetchReply: true, ephemeral: true })
const collector = selectResponseMsg.createMessageComponentCollector({ componentType: 'SELECTMENU', time: 60000 });
collector.on('collect', i => {
if (i.user.id === interaction.user.id) {
i.reply(`${i.user.id} chose ${i.customId}`);
} else {
i.reply({ content: `No.`, ephemeral: true });
}
});
collector.on('end', collected => {
console.log(`Collected ${collected.size} interactions.`);
});