Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

85
Vistas
Discord.JS Add a button to a message without replacing the previous one

I want to add another button to an existing message (send by the bot) I tried:

// const... log in... ....
let msg = await interaction.channel.fetchMessage(interaction.options.get('message-id'))
if(!msg || msg?.author?.id !== client.user.id) return interaction.reply({ content: "Error..." })

msg.edit({ embeds: ["a defined embed"], components: [row] })

When I edit the components, it replaces the first one with the new one.

How can I add a new button to the message?

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

msg.edit({ embeds: ["a defined embed"], components: [msg.components[0]], row] });
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos