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);
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)
1const exampleEmbed = {
2 color: 0x0099ff,
3 title: 'Some title',
4 url: 'https://discord.js.org',
5 author: {
6 name: 'Some name',
7 icon_url: 'https://i.imgur.com/wSTFkRM.png',
8 url: 'https://discord.js.org',
9 },
10 description: 'Some description here',
11 thumbnail: {
12 url: 'https://i.imgur.com/wSTFkRM.png',
13 },
14 fields: [
15 {
16 name: 'Regular field title',
17 value: 'Some value here',
18 },
19 {
20 name: '\u200b',
21 value: '\u200b',
22 inline: false,
23 },
24 {
25 name: 'Inline field title',
26 value: 'Some value here',
27 inline: true,
28 },
29 {
30 name: 'Inline field title',
31 value: 'Some value here',
32 inline: true,
33 },
34 {
35 name: 'Inline field title',
36 value: 'Some value here',
37 inline: true,
38 },
39 ],
40 image: {
41 url: 'https://i.imgur.com/wSTFkRM.png',
42 },
43 timestamp: new Date(),
44 footer: {
45 text: 'Some footer text here',
46 icon_url: 'https://i.imgur.com/wSTFkRM.png',
47 },
48};
49
50message.channel.send({ embed: exampleEmbed });
1//top of file
2const Discord = require('discord.js')
3
4//example (inside of a command)
5
6const embed = new Discord.Message.Embed()
7embed.setAuthor(`example`)
8embed.setTitle(`example`)
9embed.setDescription(`example`)
10
11message.channel.send({embed});
12
13//there are obviously some other add-ons, such as AuthorIcon and URL.