Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

225
Views
Discord.js V13: How to edit Message Object of Interaction?

I am trying to update my discord bot to the new version of discord.js (v13). I have a message with an embed and two buttons, one for previous Page and one for next page. When a user clicks a button, I am trying to edit the embed to show something else. But then I get a

TypeError: interaction.message.edit() is not a function.

I can print out the interaction.message and it shows the message Object, but the function can not be called. I am using the interactionCreate event.

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the interaction.update() method:

// send a message

message.channel.send({ embeds: [embed], components: [buttons] })

/*
listen for the "interactionCreate" event or use any other method
of detecting an interaction like interaction collectors or awaitMessageComponent 
*/

client.on("interactionCreate", (interaction) => {
    interaction.update({ embeds: [aDifferentEmbed] })
})
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!