#Invalid Form Body
1 messages · Page 1 of 1 (latest)
C:\Users\denni\OneDrive\Documents\djs\Levels\node_modules\discord.js\src\rest\RequestHandler.js:298
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Invalid Form Body
embeds[0].description: This field is required
at RequestHandler.execute (C:\Users\denni\OneDrive\Documents\djs\Levels\node_modules\discord.js\src\rest\RequestHandler.js:298:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (C:\Users\denni\OneDrive\Documents\djs\Levels\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
at async TextChannel.send (C:\Users\denni\OneDrive\Documents\djs\Levels\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:171:15) {
method: 'post',
path: '/channels/868474490085052488/messages',
code: 50035,
httpStatus: 400,
requestData: {
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
title: null,
type: 'rich',
description: null,
url: null,
timestamp: null,
color: null,
fields: [],
thumbnail: null,
image: null,
author: null,
footer: null
}
],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
},
files: []
}
}
You cannot send empty embeds.
I'm not using MessageEmbed.
Code:
const rank = new Canvacord.Rank()
.setAvatar(user.displayAvatarURL({
format: 'png',
dynamic: true
}))
.setCurrentXP(curXP)
.setRequiredXP(needXP)
.setStatus(client.presence.status)
.setLevel(level)
.setRank(1, 'RANK', false)
.setProgressBar("#00FF00", "COLOR")
.setOverlay("#000000")
.setUsername(user.username)
.setDiscriminator(user.discriminator)
.setBackground("COLOR", "#808080")
rank.build()
.then(data => {
const attachment = new Discord.MessageAttachment(data, "rank.png")
message.channel.send({
embeds: [attachment]
})
})
}
We don't provide help with third party packages, contact the package author.
It may have a value but that value is then either null or undefined
Can I see how you're sending the embed
Also your issue is that you're trying to send an attachment as embed
Thats just wrong
Send it as attachment
Did someone ping me?
it's fine
Try:
const embed = new MessageEmbed()
.setTitle(`Invalid Usage!`)
.setDescription("Test")
.setColor("RED")
.setTimestamp()
message.channel.send({ embeds: embed })
Have you tried it before the embed before the dot?
I'll try it on my end
Are you getting:
TypeError: this.options.embeds?.map is not a function
It works for me:
Can you send me the code without the function
What are the need for the functions?
i need to see the functions bit for me to understand how to solve your error
the whole thing's just confusing me a bit
can you send more a bit more of the code around the function
Wouldn't it be:
function invalidUsage(message, callback) {
lmao
oh lmao
well, have a good night