1// at the top of your file
2const Discord = require('discord.js');
3
4// inside a command, event listener, etc.
5const exampleEmbed = new Discord.MessageEmbed()
6 .setColor('#0099ff')
7 .setTitle('Some title')
8 .setURL('https://discord.js.org/')
9 .setAuthor('Some name', 'https://i.imgur.com/wSTFkRM.png', 'https://discord.js.org')
10 .setDescription('Some description here')
11 .setThumbnail('https://i.imgur.com/wSTFkRM.png')
12 .addFields(
13 { name: 'Regular field title', value: 'Some value here' },
14 { name: '\u200B', value: '\u200B' },
15 { name: 'Inline field title', value: 'Some value here', inline: true },
16 { name: 'Inline field title', value: 'Some value here', inline: true },
17 )
18 .addField('Inline field title', 'Some value here', true)
19 .setImage('https://i.imgur.com/wSTFkRM.png')
20 .setTimestamp()
21 .setFooter('Some footer text here', 'https://i.imgur.com/wSTFkRM.png');
22
23channel.send(exampleEmbed);
1message.channel.send({
2 "embed": {
3 "color": 12943398,
4 "fields": [
5 {
6 "name": "Information",
7 "value": "Embeds work for both text, and emoji. You can use variables too"
8 }
9 ]
10 }
11})
12
13//If you want to make your own rich embed, I would recommend the website listed below next to source
1let Embed = new Discord.MessageEmbed()
2 .setTitle()
3 .setAuthor()
4 .setColor()
5 .addField()
6 .setDescription()
7 .setThumbnail()
1const embed = new Discord.RichEmbed() //Ver 11.5.1 of Discord.js
2.setTitle("This is a title")
3.setTitle("http://tryitands.ee")
4.setDescription("This is a description")
5.setTimestamp()
6.setFooter("This is a footer")
7.setAuthor("This is the author's name", //and this its profile pic)
8.addField("This is a field", "this is its description")
9.setImage("https://cdn.discordapp.com/avatars/449250687868469258/1709ab4f567c56eaa731518ff621747c.png?size=2048")
10.setThumbnail("https://cdn.discordapp.com/avatars/449250687868469258/1709ab4f567c56eaa731518ff621747c.png?size=2048")
11<message>.<channel>.send(embed)