bussin
bussin
DIAdiscord.js - Imagine an app
Created by bussin on 8/19/2023 in #djs-questions
discord.js ignores select menu input
const { Events, EmbedBuilder, ActionRowBuilder, StringSelectMenuOptionBuilder, StringSelectMenuBuilder, ComponentType } = require("discord.js");

module.exports = {
name: Events.InteractionCreate,
async execute(client, interaction) {) {
if (interaction.customId === "presetListMenu") {
// ...

let categoryResponse = await interaction.reply({
embeds: [presetCategories],
components: [...row],
ephemeral: true
});

const collector = categoryResponse.createMessageComponentCollector({
componentType: ComponentType.StringSelect,
time: 6e4 * 2
});

collector.once("collect", async (i) => {
const categorySelection = i.values[0];
console.log(categorySelection);
// ...

await interaction.editReply({
embeds: [presetCategories],
components: [],
ephemeral: true
});
});
}
const { Events, EmbedBuilder, ActionRowBuilder, StringSelectMenuOptionBuilder, StringSelectMenuBuilder, ComponentType } = require("discord.js");

module.exports = {
name: Events.InteractionCreate,
async execute(client, interaction) {) {
if (interaction.customId === "presetListMenu") {
// ...

let categoryResponse = await interaction.reply({
embeds: [presetCategories],
components: [...row],
ephemeral: true
});

const collector = categoryResponse.createMessageComponentCollector({
componentType: ComponentType.StringSelect,
time: 6e4 * 2
});

collector.once("collect", async (i) => {
const categorySelection = i.values[0];
console.log(categorySelection);
// ...

await interaction.editReply({
embeds: [presetCategories],
components: [],
ephemeral: true
});
});
}
Updated from [email protected] -> [email protected] last night and it appears to completely ignore the collector here, no output at all when selecting an option.
33 replies