TypeError: MessageEmbed is not a constructor

I seem to keep getting this error when trying to setup the DM when they get banned I get this error 2|Fireball Beta | Error while banning: TypeError: MessageEmbed is not a constructor 2|Fireball Beta | at module.exports (/mnt/volume_tor1_01/Fireball-beta/src/commands/moderation/ban.js:26:19) 2|Fireball Beta | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) this is my code https://pastebin.com/6gVzzqUi
Pastebin
const Discord = require('discord.js');module.exports = async (clien...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
5 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Danial
Danial13mo ago
It's EmbedBuilder in v14
d.js docs
d.js docs13mo ago
guide Additional Information: Updating from v13 to v14 read more
X_DigitalNinja
X_DigitalNinja13mo ago
This is my DIscord.js npm list discord.js
├─┬ discord-giveaways@6.0.1
│ └── discord.js@14.13.0 deduped
├─┬ discord-image-generation@1.4.25
│ └── discord.js@14.13.0 deduped
└── discord.js@14.13.0
├─┬ discord-giveaways@6.0.1
│ └── discord.js@14.13.0 deduped
├─┬ discord-image-generation@1.4.25
│ └── discord.js@14.13.0 deduped
└── discord.js@14.13.0
And this is the embed
// Create embed for the DM
const embed = new Discord.MessageEmbed()
.setTitle("You've been banned!")
.setDescription(`You've been banned from **${interaction.guild.name}**.`)
.addField("Banned By", interaction.user.tag)
.addField("Reason", reason)
.setColor("#ff0000");
// Create embed for the DM
const embed = new Discord.MessageEmbed()
.setTitle("You've been banned!")
.setDescription(`You've been banned from **${interaction.guild.name}**.`)
.addField("Banned By", interaction.user.tag)
.addField("Reason", reason)
.setColor("#ff0000");
Danial
Danial13mo ago
Yes, it's EmbedBuilder instead of MessageEmbed in v14, check out the guide I linked above
Want results from more Discord servers?
Add your server