RichEmbedを使って埋め込みを送信するサンプル
code:js
const Discord = require('discord.js')
const client = new Discord.Client()
client.on('message', message => {
if (message.content === '!embed') {
const embed = new Discord.RichEmbed()
.setTitle('埋め込みのタイトル')
.addField('name', 'value')
.setColor('RANDOM')
.setTimestamp()
message.channel.send(embed)
}
})
client.login('token')
実行結果:
https://gyazo.com/27c0321ade2c92544661fa5a711f1fc5