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

143
Vistas
Create an embed message on DiscordJS 13 with Node JS 16 - Discord Bot

How to display the latency of the api, and the bot in an embed message on discordJS with node js 16 Expected result: https://i.imgur.com/DfJ6eVl.png (all in an embed message like this one: https://i.imgur.com/I7T9Rvj.png

I've been trying different things for more than a week, this project is giving me a headache, I've spent my time fixing problems, modifying, deleting, starting again, I'm coming here in the hope to see an END to this command x)

Here is what I have working now : https://i.imgur.com/SYWgGzD.png If need be I show you what I tried but it's not ultra necessary, thanks in advance to all those who could help me!

I checked the guide https://discordjs.guide/popular-topics/embeds.html#using-the-embed-constructor but it didn't help me more to create an embed, I know how to get the data for the latency, but I can't create the embed actually

module.exports = {
    name: "ping",


    execute(message, args) {
        message.channel.send({ content: "Pong." });
    },
};

When i do : !ping https://i.imgur.com/jwWYufu.png

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

0

If you're asking how to create a simple embed, you can do that like so:

// const Discord = require('discord.js');
let embed = new Discord.MessageEmbed()
    .setAuthor('author name',  /* avatar */'https://cdn.discordapp.com/embed/avatars/0.png', '')
    .setDescription('description')
    .setTitle('title')
    .addField('1', 'field 1')
    .addField('2', 'field 2', /* inline */ true)
    .addField('3', 'field 3', /* inline */ true)
channel.send({embeds: [embed]})

Result:

The resulting embed

Don't forget the []! channel.send() expects an object that has at least a content property of type string, or an embeds property of type Discord.MessageEmbed[].

See also the discord.js 13 documentation for info on more things you can add to an embed, like a footer for instance. There's also https://leovoel.github.io/embed-visualizer/, which is a useful tool for building embeds, albeit in json.

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