Expecting a string primitive for SlashCommandBuilder

I tried making an embed command using Slash commands and a lot of paramaters(probably not a good idea from the start 😅) and after it gave me a ValidationError asking for a string primitive. It doesn't tell me what it was given or where it happened in my own code, but here is the line it hates and my river of parameters. data: new SlashCommandBuilder() .setName("embed") .setDescription("Writes an embed") .addStringOption(s=>s.setName("title").setRequired(false)) .addStringOption(s=>s.setName("color").setRequired(false)) .addStringOption(s=>s.setName("description").setRequired(false)) .addStringOption(s=>s.setName("footer").setRequired(false)) .addStringOption(s=>s.setName("image").setRequired(false)) .addStringOption(s=>s.setName("thumbnail").setRequired(false)) .addStringOption(s=>s.setName("timestamp").setRequired(false)) .addStringOption(s=>s.setName("author").setRequired(false)) .addStringOption(s=>s.setName("url").setRequired(false)) .addStringOption(s=>s.setName("video").setRequired(false)) .addStringOption(s=>s.setName("provider").setRequired(false)), (yes ik its a lot) commands.push(command.data.toJSON()) <-- index.js line that errored. (command is the object returned from module.exports in my embed script.)
6 Replies
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
MrMythical
MrMythical•3y ago
You are missing descriptions for your options...
d.js docs
d.js docs•3y ago
Codeblocks: ```js const Discord = require("discord.js"); // further code ``` becomes
const Discord = require("discord.js");
// further code
const Discord = require("discord.js");
// further code
Inline Code: `console.log('inline!');` becomes console.log('inline!');
Soviet Pancakes
Soviet PancakesOP•3y ago
you need descriptions??
MrMythical
MrMythical•3y ago
yes
Soviet Pancakes
Soviet PancakesOP•3y ago
i didnt know that ;-;
Want results from more Discord servers?
Add your server