Reputation: 33
I am working on a private discord bot, using the library discord.js
. I am currently using replit.com
to edit the bot as well as to host it. I just made a new command, which is supposed to send an embed in a specific channel. I tried to make it, but when I run it, it gives this error:
[FATAL] Possibly Unhandled Rejection at: Promise Promise {
<rejected> TypeError: Discord.MesageEmbed is not a constructor
at Object.run (/home/runner/PrivateBo/Commands/Utility/welcome.js:8:17)
at Client.<anonymous> (/home/runner/PrivateBot/welcome.js:107:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at runNextTicks (internal/process/task_queues.js:66:3)
at processImmediate (internal/timers.js:434:9)
} reason: Discord.MesageEmbed is not a constructor
This is how my file looks like:
const Discord = require('discord.js');
const client = new Discord.Client();
module.exports = {
name: "welcome",
description: "welcomes a user",
run: async (client, message, args) => {
const member = message.mentions.members.first();
let embed = new Discord.MesageEmbed()
.setAuthor("Welcome")
.setColor("RANDOM")
.setDescription("Welcome member to the server! Please read <#placeholder> and chill here!")
.setFooter("Regards, Staff Team")
messaeg.channel.send(embed)
}
}
Upvotes: 0
Views: 365
Reputation: 151
Fix the typo in new Discord.MesageEmbed()
.
Should be Discord.MessageEmbed()
Upvotes: 2