M
M
matveyyyyyyyy2020-10-09 14:52:55
Node.js
matveyyyyyyyy, 2020-10-09 14:52:55

How to send an embed message?

const exampleEmbed = new Discord.MessageEmbed()
  .setColor('#0099ff')
  .setTitle('Some title')
  .setURL('https://discord.js.org/')
  .setAuthor('Some name', 'https://i.imgur.com/wSTFkRM.png', 'https://discord.js.org')
  .setDescription('Some description here')
  .setThumbnail('https://i.imgur.com/wSTFkRM.png')
  .addFields(
    { name: 'Regular field title', value: 'Some value here' },
    { name: '\u200B', value: '\u200B' },
    { name: 'Inline field title', value: 'Some value here', inline: true },
    { name: 'Inline field title', value: 'Some value here', inline: true },
  )
  .addField('Inline field title', 'Some value here', true)
  .setImage('https://i.imgur.com/wSTFkRM.png')
  .setTimestamp()
  .setFooter('Some footer text here', 'https://i.imgur.com/wSTFkRM.png');

channel.send(exampleEmbed);


At the same time, it gives an error in the console that "channel.send (exampleEmbed);
^

ReferenceError: channel is not defined"

Also, tell me how to send an embed message to one or another ds channel?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-10-09
@matveyyyyyyyy

*message.channel.send()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question