MessageEmbedを使って埋め込みを送信するサンプル
jsconst { Client, MessageEmbed } = require('discord.js');
const options = {
intents: ["GUILDS", "GUILD_MESSAGES"]
};
const client = new Client(options);
client.on('messageCreate', message => {
if (message.content === '!embed') {
const embed = new MessageEmbed()
.setTitle('埋め込みのタイトル')
.setURL('https://google.com')
.addField('name', 'value')
.setColor('RANDOM')
.setTimestamp()//引数にはDateオブジェクトを入れることができる。何も入れないと今の時間になる
message.channel.send({ embeds: [embed] })
}
})
client.login('token')
実行結果:

embed.jsconst embed = new MessageEmbed()
.setTitle('埋め込みのタイトル 256字まで')
.setDescription('埋め込みの説明 4096字まで')
.setAuthor({ name: '著者名 256字', iconURL: 'https://gyazo.com/520c092f191cf3c7dcd75a559b7dd536/max_size/1000' })
.setURL('https://google.com')
.setThumbnail('https://gyazo.com/520c092f191cf3c7dcd75a559b7dd536/max_size/1000')
.setImage('https://p.kindpng.com/picc/s/108-1084174_discord-js-discord-js-logo-png-transparent-png.png')
.addField('フィールドの名前 256字まで', 'フィールドの値 1024字まで')
.addField('フィールドは','最大25個まで')
.addField('インラインフィールド','`,true`をつけることで',true)
.addField('インラインフィールド','最大3つまで横に並べられる',true)
.addField('インラインフィールドじゃない','途中で`,true`を取ると元に戻る')
.addFields({name:'json形式で書けるフィールド',value:'字数制限などは同じ'},{name:'`{name:"name",value:"value"}`で1セット',value:'足りないとエラーが出る'})
.addFields({name:'もちろん',value:'こっちも',inline:true},{name:'インラインに',value:'できる',inline:true})
.setColor('#00ff00')
.setFooter('埋め込みのフッター 2048字まで\n埋め込み全体の文字数は6000字まで\n一つのメッセージで送れる埋め込みは10個')
.setTimestamp()
message.channel.send({ embeds: [embed] });
実行結果: