I was wondering how to write an embed in discord.js. This is my current code: it is not functional. I get the warning: 'message is not defined' on message.channel.send I do not know how to fix this. I was hoping you guys could tell me how to fix this. js
// Embeding the image in An Embeded message
const EmbededTweet = new MessageEmbed()
.setColor('0x00FF00')
.setTitle(`You made ${account} tweet this:`)
.setImage(imageUrl)
.setTimestamp();
// replying with the Embeded message
await interaction.reply({embeds: [EmbededTweet]});
More code could be appreciated, but this is why I the error is showing up.
Explanation
You probably didn't declare "MessageEmbed" when you declared discord, and in your module.exports.
How to Solve
At the top of your code, you should have something like const Discord = require('discord.js'); change this to const { Discord, MessageEmbed } = require('discord.js');
Feel free to reply if this didn't work, have a good day.