Trouble with collecting message component interactions

After upgrading from an earlier discord.js version to the newest, slash commands that replied with a message with message components, that when clicked on replied with another message with message components, that when clicked on replied with a third message, began not working. (The first version that breaks them is v14.12.0, I've temporarily downgraded to v14.11.0 until I can find a solution) 1. Component interactions of responseOne are received by collectorOne, but interactions of responseTwo aren't received by collectorTwo (no errors) I was able to "fix" 1. by setting fetchReply to true when replying to the interaction(s) to return the message(Message) instead of the interaction(InteractionResponse). 2. However, trying to edit the message(responseOne.edit) would give me the following error:
DiscordAPIError[10008]: Unknown Message
at handleErrors (path_to_workspace/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (path_to_workspace/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (path_to_workspace/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (path_to_workspace/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async GuildMessageManager.edit (path_to_workspace/node_modules/discord.js/src/managers/MessageManager.js:177:15)
at async InteractionCollector.<anonymous> (path_to_workspace/commands/admin/test.js:46:25)
DiscordAPIError[10008]: Unknown Message
at handleErrors (path_to_workspace/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (path_to_workspace/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (path_to_workspace/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (path_to_workspace/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async GuildMessageManager.edit (path_to_workspace/node_modules/discord.js/src/managers/MessageManager.js:177:15)
at async InteractionCollector.<anonymous> (path_to_workspace/commands/admin/test.js:46:25)
any help with 1. or 2. would be appreciated code: https://pastebin.com/QjGyRQ4C Node.js: v21.2.0 discord.js: v14.14.1
3 Replies
d.js toolkit
d.js toolkit12mo 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
SpecialSauce
SpecialSauce12mo ago
Since it’s an ephemeral message you can’t edit it through the message manager. You could use <ComponentInteraction>.update() to edit the message that the componentInteraction was triggered from.
hajimukumao
hajimukumaoOP12mo ago
Changed responseOne.edit to i.update, replaced i.replys with i.followUps and everything works. Thanks!
Want results from more Discord servers?
Add your server