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

227
Views
Cómo enviar botones en webhooks en discord.js@13.6.0 y nodejs

Por lo tanto, estoy tratando de enviar una inserción y dos botones en un webhook desde el backend de mi sitio web, que se crea con express.js, a Discord con discord.js. Entonces, aquí está mi código fuente: -

 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] })

He eliminado código innecesario. Entonces, si ejecuto esto, se envía la inserción, pero no los botones y no hay ningún error, excepto algunas advertencias que no están relacionadas.

 (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

cambie .setFooter a este estilo: .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!