if(interaction.isSelectMenu) {
const decision = `${interaction.values}`;
if(decision != "undefined") {
if(decision == "raids") {
const raidMenu = new MessageActionRow().addComponents(
new MessageSelectMenu()
.setCustomId("raidMenu")
.setPlaceholder("Please select the raid")
.addOptions([
{
label: "Midnight Skypetal Plains",
value: "MSP",
description: "Midnight Skypetal Plains raid",
},
{
label: "Skybreak Spire",
value: "BT",
description: "Skybreak Spire A.K.A Black Tower (BT) raid",
},
{
label: "Scion's Keep",
value: "SK",
description: "Scion's Keep raid",
},
{
label: "Temple of Eluvium",
value: "VT",
description: "Temple of Eluvium A.K.A Vortex Temple (VT) raid",
},
{
label: "Nightfall Sanctuary",
value: "TT",
description: "Nightfall Sanctuary A.K.A Twilight Temple (TT) raid",
},
{
label: "Eternity Temple",
value: "ET",
description: "Eternity Temple raid",
},
{
label: "Bloodmoon",
value: "BM",
description: "Bloodmoon raid",
}
])
)
await interaction.update({ components: [raidMenu] });
const filter = (interaction) =>
interaction.isSelectMenu();
const collector = interaction.channel.createMessageComponentCollector({
filter,
max: 1
});
collector.on("collect", async (collected) => {
const value = collected.values;
console.log(value);
});
}
}
}
}