Reputation: 57
this is the slash command:
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
await lib.discord.commands['@0.0.0'].create({
"guild_id": "1018895233003569193",
"name": "submit-hw",
"description": "trimite tema",
"options": [
{
"type": 3,
"name": "materie",
"description": "",
"choices": [
{
"name": "romana",
"value": "romana"
},
{
"name": "mate",
"value": "mate"
},
{
"name": "religie",
"value": "religie"
},
{
"name": "engleza",
"value": "engleza"
},
{
"name": "franceza",
"value": "franceza"
},
{
"name": "desen",
"value": "desen"
},
{
"name": "sport",
"value": "sport"
},
{
"name": "biologie",
"value": "biologie"
},
{
"name": "fizica",
"value": "fizica"
},
{
"name": "tic",
"value": "tic"
},
{
"name": "istorie",
"value": "istorie"
},
{
"name": "chimie",
"value": "chimie"
},
{
"name": "consiliere",
"value": "consiliere"
},
{
"name": "sociala",
"value": "sociala"
},
{
"name": "optional",
"value": "optional"
},
{
"name": "tehnologica",
"value": "tehnologica"
},
{
"name": "geografie",
"value": "geografie"
},
{
"name": "muzica",
"value": "muzica"
}
],
"required": true
},
{
"type": 3,
"name": "deadline",
"description": "",
"required": true
},
{
"type": 3,
"name": "tema",
"description": "",
"required": true
}
]
});
and this is the error
It says:
Sorry, could not save you slash commands: Invalid Form Body: code 50035:
Can someone help me out? I wrote all of the command options in the ui text boxes, not as code. SO won't let me post this without more string of text thats not code and i have no idea what to type.....
Upvotes: 1
Views: 40
Reputation: 105
Description is required for all slash commands and options, including subcommands and subcommand groups. Just a heads up, Error code 50035 would go into detail to show which part is causing an error, such as one of the options type being incorrect.
Upvotes: 0