#how do i edit a message without the interaction failed error

15 messages · Page 1 of 1 (latest)

alpine field
#

i use message = await msg.reply('foo') => message.edit('foobar') rn

round jasperBOT
#

• 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.

alpine field
#

i mean like this error

round jasperBOT
ionic sonnet
#

This method edits the message that the button is on

alpine field
#

is it msg.update instead

ionic sonnet
#

Only if msg is a ButtonInteraction instance

alpine field
#

so that changes the original message?

#

like a msg.reply message

ionic sonnet
#

It changes the message that the button was on

rancid ridge
#

@alpine field you call the functions not on the message itself, but on the interaction object that u got from the event

#
- msg.update("uhoh")
+ buttonInteraction.update("uhoh")
#

example(idk how ur coding it rn):

client.on("interaction", buttonInteraction=>{
    buttonInteraction.update("uhoh")
})