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);
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)
1const Discord = require('discord.js')
2
3const embed = new Discord.MessageEmbed()
4 .setTitle('Example')
5 .addFields(
6 { name: 'foo', value: 'bar', inline: true },
7 { name: '\u200b', value: '\u200b', inline: true},
8 { name: 'foo2', value: 'bar2', inline: true }
9 )
10
11message.reply(embed)
1const embed = new Discord.MessageEmbed()
2 .setTitle("Title")
3 .setColor("0xff0000")//red
4 .addField("field title", "field content")
5 .addField('\u200B','\u200B') //blank field, can also be inline with the 3rd parameter set to true
6;