discord js send message and embed code example
Example 1: discord.js send embed
message.channel.send({
"embed": {
"color": 12943398,
"fields": [
{
"name": "Information",
"value": "Embeds work for both text, and emoji. You can use variables too"
}
]
}
})
//If you want to make your own rich embed, I would recommend the website listed below next to source
Example 2: discord.js MessageEmbed
//top of file
const Discord = require('discord.js')
//example (inside of a command)
const embed = new Discord.Message.Embed()
embed.setAuthor(`example`)
embed.setTitle(`example`)
embed.setDescription(`example`)
message.channel.send({embed});
//there are obviously some other add-ons, such as AuthorIcon and URL.