Message Component Collector is not collecting after String Select Menu Interaction

I have this function (handleMatchConfirmation), which replies to an interaction, then use the responseInteraction to create a Message Component Collector to collect the users' button interactions to change the message depending on their inputs (in this case, confirm or cancel a match, for example). It works as intended when the interaction passed is a ChatInputCommandInteraction (as in the first message of the picture), but when I try to execute the same function after the user selects an option in a StringSelectMenu (so passing a StringSelectMenuInteraction) even though it succesfully replies the message and creates the Message Component Collector, it fails to collect any button input (as in the second message in the picture), not even passing by the Message Filter. I will upload the function, as well as the logs produced by the executing using the ChatInputCommandInteraction and the StringSelectMenuInteraction, for comparison.
No description
3 Replies
d.js toolkit
d.js toolkit2d 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
SEBAS
SEBASOP2d ago
Here are the files. As a note, the replyInteraction is a wrapper that in both cases execute the interaction.reply(message) function for the interaction passed as a parameter
SEBAS
SEBASOP21h ago
Quick Update: I resolved the issue by passing the withResponse parameter to the replied message, and it works now! If anyone else is facing the same problem, here’s an example of the implementation:
const response = await interaction.reply({ content: confirmationMessage, withResponse: true })
const message = response.resource.message;
const collectorButton = message.createMessageComponentCollector({ filter:messageFilter,componentType: ComponentType.Button, time: TIME_LIMIT_CONFIRMATION });
const response = await interaction.reply({ content: confirmationMessage, withResponse: true })
const message = response.resource.message;
const collectorButton = message.createMessageComponentCollector({ filter:messageFilter,componentType: ComponentType.Button, time: TIME_LIMIT_CONFIRMATION });
I’m marking this as solved, but I still find it confusing that, without this workaround, the collector only worked with the Command Interaction and not the String Select Menu Interaction. If anyone could verify whether this is the intended behavior, it would be greatly appreciated!

Did you find this page helpful?