Home > other >  Discord bot message is not embedded
Discord bot message is not embedded

Time:09-28

With following code:

        message.reply('some reply', { embed: {
            color: 3447003,
            description: "A very simple Embed!"
          }
        });
    }

my bot response will look like a normal message. I looked up several tutorials on this topic. None could me help. I also tried message.send or message.channel.send. Same/similar results. I aim to have something like shown here: https://discordjs.guide/popular-topics/embeds.html#embed-preview

CodePudding user response:

Message.reply, TextChannel.send, and Message.edit now only take one argument. Changing it to this will work:

message.reply({
  content: 'some reply', 
  embeds: [{
    color: 3447003,
    description: "A very simple Embed!"
  }]
});

CodePudding user response:

Since Discord.js V13 you have to pass embeds to the .send()/ .reply(), etc. function(s) like this:

const embed = {
   color: 3447003,
   description: "A very simple Embed!"
}

message.reply({ content: "Your content", embeds: [embed] })

// same with message.channel.send()
  • Related