Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js 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] });
Source by discordjs.guide #
 
PREVIOUS NEXT
Tagged: #embed
ADD COMMENT
Topic
Name
6+4 =