RoleSelectMenuBuilder interaction failed

Hey i am get interaction failed and no interaction i am getting
// Ask for moderation role
const moderationEmbed = new EmbedBuilder()
.setTitle(
"Please select the moderation role for managing the ticket."
)
.setColor(color)
.setFooter(footer);

const roleRow = new ActionRowBuilder().addComponents(
new RoleSelectMenuBuilder()
.setCustomId("Setup_ModerationRole_menu")
.setPlaceholder("Select a role")
.setMinValues(1)
.setMaxValues(25)
);

const msg2 = await interaction.reply({
embeds: [moderationEmbed],
components: [roleRow],
});
console.log("1")
const filterRoles = (interaction) =>
interaction.customId === "Setup_ModerationRole_menu" &&
interaction.user.id === message.author.id;

const roleCollector =
await msg2.createMessageComponentCollector({
componentType: ComponentType.RoleSelect,
filter: filterRoles,
time: 15 * 60 * 1000,
});

roleCollector.on("collect", async (interaction) => {
console.log("bi");
const selectedRole = interaction.roles; // Assuming single role selection
roleCollector.stop();
// Ask for moderation role
const moderationEmbed = new EmbedBuilder()
.setTitle(
"Please select the moderation role for managing the ticket."
)
.setColor(color)
.setFooter(footer);

const roleRow = new ActionRowBuilder().addComponents(
new RoleSelectMenuBuilder()
.setCustomId("Setup_ModerationRole_menu")
.setPlaceholder("Select a role")
.setMinValues(1)
.setMaxValues(25)
);

const msg2 = await interaction.reply({
embeds: [moderationEmbed],
components: [roleRow],
});
console.log("1")
const filterRoles = (interaction) =>
interaction.customId === "Setup_ModerationRole_menu" &&
interaction.user.id === message.author.id;

const roleCollector =
await msg2.createMessageComponentCollector({
componentType: ComponentType.RoleSelect,
filter: filterRoles,
time: 15 * 60 * 1000,
});

roleCollector.on("collect", async (interaction) => {
console.log("bi");
const selectedRole = interaction.roles; // Assuming single role selection
roleCollector.stop();
6 Replies
d.js toolkit
d.js toolkit8mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
sharma ji
sharma jiOP8mo ago
It's an another collector and the interaction which I am getting from it i am replying to that It send the moderation Role embed successfully but I never get intraction in collector This is my whole file
d.js docs
d.js docs8mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
sharma ji
sharma jiOP8mo ago
https://srcb.in/rU5McEStAt That works!! but how can you explain plz
NyR
NyR8mo ago
<Interaction>.reply/defer/followUp/editReply returns InteractionResponse not a Message, that on itself is not a problem, since collector's method also exist on InteractionResponse, but I think it can chalked up to a bug or issue but for some reasons it doesn't work(I don't know the exact cause), fetchReply ensures it returns a Message
sharma ji
sharma jiOP8mo ago
Intresting
Want results from more Discord servers?
Add your server