"Cannot send empty Message" but its an valid embed

if (!user) { return message.edit("❌ Unknown user!") } let embed = new Discord.MessageEmbed() .setTitle("**Userinfo**") .setColor("#00D4FF") .setThumbnail(user.avatarURL) .setDescription("Username - **" + user.username + "**\nDiscrim - **" + user.discriminator + "**\nID - **" + user.id + "**\nStatus - **" + user.presence.status + "**\n") .setFooter({text: "Quelle: Discord"}); //send the embed message.channel.send({embeds: [embed]}); whats the problem :( DiscordAPIError: Cannot send an empty message using discord.js v13
8 Replies
d.js toolkit
d.js toolkit5mo 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! - Marked as resolved by staff
monbrey
monbrey5mo ago
Probably not coming from this line then
philipp
philipp5mo ago
Thats the only thing i Send
monbrey
monbrey5mo ago
Does it get sent?
philipp
philipp5mo ago
No
monbrey
monbrey5mo ago
Can you show the error stack? And put your code in a proper codeblock, three backticks
philipp
philipp5mo ago
I already closed my Mac Right now, will Send it tomorrow @ʎǝɹquoɯ I'm trying to send my code and the error. Server blocks the message, could i send you that via DM? Code:
let user = message.author;
if (!user) { return message.edit(":x: Unknown user!") }
let embed = new Discord.MessageEmbed()
.setTitle("**Userinfo**")
.setColor("#00D4FF")
.setThumbnail(user.avatarURL)
.setDescription("Username - **" + user.username + "**\nDiscrim - **" + user.discriminator + "**\nID - **" + user.id + "**\nStatus - **" + user.presence.status + "**\n")
.setFooter({text: "Quelle: Discord"});
//send the embed
message.channel.send({embeds: [embed]});
}
});
let user = message.author;
if (!user) { return message.edit(":x: Unknown user!") }
let embed = new Discord.MessageEmbed()
.setTitle("**Userinfo**")
.setColor("#00D4FF")
.setThumbnail(user.avatarURL)
.setDescription("Username - **" + user.username + "**\nDiscrim - **" + user.discriminator + "**\nID - **" + user.id + "**\nStatus - **" + user.presence.status + "**\n")
.setFooter({text: "Quelle: Discord"});
//send the embed
message.channel.send({embeds: [embed]});
}
});
Okay, that did work
philipp
philipp5mo ago
I have to send the error just like that
No description