#Fetching the original ChatInputCommandInteraction from MessageComponentInteraction

19 messages · Page 1 of 1 (latest)

tranquil harbor
#

After a user interacts with a component like a button, I would like to instead of creating a new interaction ignore this and instead update the old one, is that possible? I can't seem to find the original interaction ID from, nor a method to ignore this one and update the old one

Version information:
Node: v19.7.0
Packages:
@discordjs/builders 1.4.0 dotenv 16.0.3 mongodb 5.1.0 pino-pretty 9.4.0
common-tags 1.8.2 luxon 3.3.0 path-exists 5.0.0 yargs 17.7.1
discord.js 14.7.1 make-fetch-happen 11.0.3 pino 8.11.0

cold siren
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

ornate sageBOT
sleek cosmos
#

Maybe this might work?

hallow relic
tranquil harbor
#

That's what I want indeed, and I also needed the original interaction id, thanks a lot@sleek cosmos @hallow relic :D

tranquil harbor
hallow relic
#

what do you want the original interaction id for? that's mostly useless

#

you update a Message (the reply to an interaction), not an interaction

tranquil harbor
#

Aha

hallow relic
#

do you want the messageId of the Message you update?

#

or what's the use-case?

tranquil harbor
tranquil harbor
hallow relic
#

no. the latter is the id of the Interaction (something you only need if you actually want to respond or followUp to that interaction) the former is the id of the response to that Interaction (or more exact: the id of the message the MessageComponent is on)

hallow relic
tranquil harbor
hallow relic
#

you first need to editReply with an actual update content. then you can followUp with more messages if you want

#

if you don't want to update but reply instead then don't deferUpdate