//Note: For discord.js version 14
const { EmbedBuilder } = require('discord.js');
const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF)
.setTitle('Some title')
.setURL('https://discord.js.org/')
.setAuthor({ name: 'Some name', iconURL: 'https://i.imgur.com/AfFp7pu.png', url: 'https://discord.js.org' })
.setDescription('Some description here')
.setThumbnail('https://i.imgur.com/AfFp7pu.png')
.addFields(
{ name: 'Regular field title', value: 'Some value here' },
{ name: 'u200B', value: 'u200B' },
{ name: 'Inline field title', value: 'Some value here', inline: true },
{ name: 'Inline field title', value: 'Some value here', inline: true },
)
.addFields({ name: 'Inline field title', value: 'Some value here', inline: true })
.setImage('https://i.imgur.com/AfFp7pu.png')
.setTimestamp()
.setFooter({ text: 'Some footer text here', iconURL: 'https://i.imgur.com/AfFp7pu.png' });
channel.send({ embeds: [exampleEmbed] });
const embed = new Discord.RichEmbed() //Ver 11.5.1 of Discord.js
.setTitle("This is a title")
.setTitle("http://tryitands.ee")
.setDescription("This is a description")
.setTimestamp()
.setFooter("This is a footer")
.setAuthor("This is the author's name", //and this its profile pic)
.addField("This is a field", "this is its description")
.setImage("https://cdn.discordapp.com/avatars/449250687868469258/1709ab4f567c56eaa731518ff621747c.png?size=2048")
.setThumbnail("https://cdn.discordapp.com/avatars/449250687868469258/1709ab4f567c56eaa731518ff621747c.png?size=2048")
<message>.<channel>.send(embed)
/*
Need more help? Add me on discord: Dwagon#0069
Discord.js ^13.8.1
*/
// The embed itself
const embed = new MessageEmbed()
.setTitle("Title")
.setURL("https://www.codegrepper.com/") // The redirected URL when clicking on the title
.setDescription("Description")
.addField("Title of field", "Description of field", true) // When adding ", true" you enable the inline.
// or
.addFields(
{ name: "Title of field", value: "Description of field"}, // Inline disabled
{ name: "Title of field", value: "Description of field", inline: true} // Inline enabled
)
.setAuthor({ name: "Main title", iconURL: "https://i.imgur.com/2LUu1KL.png", url: "https://www.codegrepper.com/"})
.setImage("https://i.imgur.com/2LUu1KL.png")
.setThumbnail("https://i.imgur.com/2LUu1KL.png")
.setTimestamp()
.setFooter({
text: "Main title", iconURL: "https://i.imgur.com/2LUu1KL.png"
})
.setColor("00FF00");
// Send to channel with interaction
interaction.channel.send({ embeds: [embed] });
// Send to channel with message
message.channel.send({ embeds: [embed] });