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

45
Vistas
Is there an alternative way to avoid that error?
module.exports = { 
    name: 'command',
    description: "Embeds!",
    execute(message, args, Discord) {
        const newEmbed = new Discord.MessageEmbed()
        .setColor('#304281')
        .setTitle('Rules')
        const newLocal = 'This is an embed for the server';
        setDescription(newLocal)
        .addFields(
            {name: 'Rule 1', value: 'Be good'},
            {name: 'Rule 2 ', value: 'Be polite'},
        )
        .setFooter('Make sure to check out that')

        message.channel.send(newEmbed);
    }
}

i need your help cause it prints me that error in terminal (i am new) (node:3712) DeprecationWarning: The message event is deprecated. Use messageCreate instead (Use node --trace-deprecation ... to show where the warning was created)

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

0

It is not an error just a warn. But you can just replace the event client.on('message', async () => ...) with client.on('messageCreate', async () => ...)

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos