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

237
Views
How to send buttons in webhooks in discord.js@13.6.0 and nodejs

So, I am trying to send an embed and two buttons in a webhook from my website backend which is built using express.js to Discord using discord.js. So, here is my source code:-

const buttons = new MessageActionRow()

buttons.addComponents(
    new MessageButton()
        .setLabel('View Purchase')
        .setStyle('LINK')
        .setURL(`...`), // url is present
)

buttons.addComponents(
    new MessageButton()
        .setLabel('View Payment')
        .setStyle('LINK')
        .setURL(`...`), // url is present
)

const embed = new MessageEmbed()
// creating the embed

await webhook.send({ embeds: [embed], components: [buttons] })

I have removed unnecessary code. So if I run this, the embed gets sent, but not the buttons and there is no error except some warning which are unrelated.

(node:13492) DeprecationWarning: Passing strings for MessageEmbed#setFooter is deprecated. Pass a sole object instead.
[0] (Use `node --trace-deprecation ...` to show where the warning was created)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

change .setFooter to this style : .setFooter({text: "your text", iconURL: "your link"

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!