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

243
Vistas
I can't figure out discord.js v13 buttons

I just can't figure out how to send a button interaction with a message in Discord.js v13 in v12 you just use discord-buttons but here it's built-in somehow and I can't quite get it.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Discord.js has a great documentation and you can find more about buttons in Buttons Section. It is well documented and there are some good examples too.

about 4 years ago · Juan Pablo Isaza Denunciar

0

const { MessageActionRow, MessageButton } = require('discord.js');

client.on('interactionCreate', async interaction => {
    if (!interaction.isCommand()) return;

    if (interaction.commandName === 'ping') {
        const row = new MessageActionRow()
            .addComponents(
                new MessageButton()
                    .setCustomId('primary')
                    .setLabel('Primary')
                    .setStyle('PRIMARY'),
            );

        await interaction.reply({ content: 'Pong!', components: [row] });
    }
});

For external redirect button, you should use .setLabel('LINK') instead of .setLabel('Primary') then remove .setCustomId('primary'). Add .setURL('URL')

For more click here

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