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

858
Vistas
TypeError: MessageActionRow is not a constructor

Im using discord V13 and im getting this error. (If you prefer you can look at the code in this link: https://sourceb.in/8w8wKS1Wmy)

Main file:

// main.js

const Discord = require('discord.js'); 

The command file:

// command 

const {
    MessageActionRow,
    MessageButton
} = require('discord.js');
module.exports = {
    name: 'commands',
    permissions: [],
    description: "this sends help!",
    aliases: ['cmd', 'cmdinfo', 'commandsinfo'],
    execute(client, message, cmd, args, Discord) {

            const utilbtn = new MessageActionRow()
                .addComponents(
                    new MessageButton()
                    .setCustomId('primary')
                    .setLabel('Primary')
                    .setStyle('PRIMAMRY'),
                    
                );

            const newEmbed = new Discord.MessageEmbed()
                .setTitle('**Commands**')

            message.channel.send({
                embed: [newEmbed],
                component: [utilbtn]
            });
        }
    }
}

The error message:

// the error 

const utilbtn = new MessageActionRow()
                ^           

TypeError: MessageActionRow is not a constructor
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I cannot imagine how this is not working, unless if you are using the wrong version, consider running:

npm i discord.js@13.1.0

I've tried running both:

const { MessageActionRow } = require('discord.js');
// undefined
new MessageActionRow()
// MessageActionRow { type: 'ACTION_ROW', components: [] }

The commented lines are the response when running node in console. Maybe try checking package.json, should have a line like the following:

"discord.js": "^13.1.0"
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