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:
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
- 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 OPSince 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.
Changed
responseOne.edit
to i.update
, replaced i.reply
s with i.followUp
s and everything works.
Thanks!