#Edit followUp interaction
31 messages · Page 1 of 1 (latest)
• 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.
Discord.js: v14.5.0
Node.js: v16.16.0
update djs to 14.7.1 and editReply accepts a MessageResolvable under the message option which you can get from resolving the returned promise from followUp
I am going to try it
I already update the version
Now how can i edit it? i don´t understand
I have this, if i use interaction.editReply, is edited the first reply and if I use attemptEmbedReply.editReply throw an error like this TypeError: attemptEmbedReply.editReply is not a function
attemptEmbedReply is a Message instance
Then how can i do it?
.
In the documentation I only see that exists fetchReply and editReply
Look at the options of editReply
Yeah, but what are the options? xD
It's right there...?
Okay, but my problem is that i cant edit the followUp reply
Why?
const attemptEmbedReply = await interaction.followUp({ embeds: [attemptEmbed[countPage]], components: [buttonsPage], ephemeral: true })
const attemptEmbedReplyFetch = await interaction.fetchReply(attemptEmbedReply.id)
console.log(attemptEmbedReplyFetch)
const filter = (i) => !i.user.bot
const attemptEmbedReplyCollector = attemptEmbedReply.createMessageComponentCollector({ filter })
attemptEmbedReplyCollector.on("collect", async (buttonPressedInteraction) => {
const ACTION_PRESSED = {
left: async function (countPage) {
if (countPage - 2 < 0) {
buttonsPage.components[0].setDisabled(true)
}
buttonsPage.components[1].setDisabled(false)
return countPage - 1
},
right: async function (countPage) {
if (countPage + 2 >= attemptEmbed.length) {
buttonsPage.components[1].setDisabled(true)
}
buttonsPage.components[0].setDisabled(false)
return countPage + 1
},
}
countPage = await ACTION_PRESSED[buttonPressedInteraction.customId](countPage)
await attemptEmbedReplyFetch.editReply({ embeds: [attemptEmbed[countPage]], components: [buttonsPage] })
await buttonPressedInteraction.deferUpdate()
})
I want to edit attemptEmbedReply followUp
But when I try to edit with editReply or edit isnt work
And how does it "not work"?
TypeError: attemptEmbedReplyFetch.editReply is not a function
And i dont know how can i do it
it's just interaction.editReply({ message, ...options })
And what have i to put in "options"?
For example this no? await interaction.editReply({ embeds: [attemptEmbed[countPage]], components: [buttonsPage] })