Please describe the problem you are having in as much detail as possible:
I'm trying to send an embed using the MessageEmbed constructor but I get an error: .flat is not a function for MessageEmbed. When I'm trying to send an embed with embed since v12 I get this error.
Include a reproducible code sample here, if possible:
const embed = new Discord.MessageEmbed()
embed.setTitle("my text");
embed.addFields(
{name: "my text", value: "`my text`"},
{name: "my text", value: "my text"}
);
embed.setFooter("my text");
embed.setColor("#892252");
return message.channel.send(embed);
//I got the same error by using .addField("my text", "my text")...
Further details:
If you need help with discord.js installation or usage, please go to the discord.js Discord server instead:
https://discord.gg/bRCvFy9
This issue tracker is only for bug reports and enhancement suggestions.
You won't receive any basic help here.
That said, the readme for the library clearly states you need Node v12.x or higher to use the discord.js library. Please update your Node.
Duplicate of #3913, #3910, #3888, #3887, and #3883.
Most helpful comment
Duplicate of #3913, #3910, #3888, #3887, and #3883.