Search code examples
javascriptdiscorddiscord.js

Discord.js embedded message error while as far as I know everything is there


Can someone tell me why I keep getting an error? Says it can't send a empty message when running it.

Image 1

Image 2


Solution

  • All you have to do is change message.channel.send(embed) to message.channel.send({ embeds: [embed] }) since when you use message.channel.send(embed), Discord thinks that the variable embed must be a string and tries to send it but it realises that it isn't and therefore the error happens.