'Cannot send empty message - Discord.JS v13

Error: DiscordAPIError: Cannot send an empty message
Code:

if(message.content == 'a!up')
    {
        const AllowedupMessage = new Discord.MessageEmbed()
        .setAuthor(process.env.AllowedAuthor)
        .setDescription(process.env.AllowedDescription)
        .setFooter(process.env.VNetworkFooter)
        .setColor(process.env.AllowedColor);
        message.channel.send({ embeds: [AllowedupMessage] })
    }

I can't figure out how to fix this stupid error. Thanks on your help :) <3



Solution 1:[1]

Depending on the version you have of Discord.js

But judging from your code, I guess it's v13

Discord.js Guide Updating from v12 to v13

Example Sending messages, embeds, files, etc. Updating from v12 to v13 The footer has been changed, now use:

.setFooter({text: 'Someone text', iconURL: 'link'})

The same for .setAuthor

- channel.send(embed);
+ channel.send({ embeds: [embed, embed2] });

- channel.send('Hello!', { embed });
+ channel.send({ content: 'Hello!', embeds: [embed, embed2] });

- interaction.reply('Hello!', { ephemeral: true });
+ interaction.reply({ content: 'Hello!', ephemeral: true });

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1