Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

230
Vistas
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 Respuestas
Responde la pregunta

0

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

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda