Cycling through different embeds with button

I have 3 button, when you press one, it sets the pressed on as primary and disables it and sets the other 2 as secondary and enables them. - embed 'A' has a select menu (accounted for) - it starts on embed 'A' - ive increase the collector time to 5 min and its still the same B -> C or C -> B = red msg A -> either B/C = fine B/C -> A = red msg Even tho they display the red msg, i can still interact issue: once i press a button (B/C) it works as intentional, changing the style and disable values. however after the first press if i try and press it again, it fails showing the following message in red: 'This interaction failed' Im not sure what the issue could be, if anyone could provide help thatll be nice
No description
7 Replies
d.js toolkit
d.js toolkit3mo 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
ScobbleQ
ScobbleQ3mo ago
and if theres a better way to do it, please do let me know as well ^^
Squid
Squid3mo ago
your menu interaction i needs to be acknowledged, just like any other interaction You should replace interaction.editReply() with i.update(), the latter of which edits the message that the interaction was received from and acknowledges the interaction Note that like other ways of acknowledging interactions, you can only acknowledge an interaction once, so make sure not to call .update() multiple times on the same interaction
ScobbleQ
ScobbleQ3mo ago
i dont think your talking about the same issue currently im not having issues with the select menu portion, its the pressing buttons giving me issues. sorry for the horrible wording. B -> C or C -> B = red msg A -> either B/C = fine B/C -> A = red msg Even tho they display the red msg, i can still interact heres a quick video i guess of it: https://streamable.com/o7zf0n like everything works (somewhat?), it just shows the red message sometimes
Streamable
Watch "This interaction failed" | Streamable
Watch ""This interaction failed"" on Streamable.
Squid
Squid3mo ago
The red message "This interaction failed" means you did not acknowledge the interaction Button interactions and select menu interactions can both be acknowledged via .update()
Squid
Squid3mo ago
Wheter i is a button or a menu interaction, your code never acknowledges it, but it should
No description
ScobbleQ
ScobbleQ3mo ago
OH i see tysm, got it!