Closed TimLiz closed 1 year ago
Environment
Describe the bug Type 1 command trouble
Working one
$cmd = new Command($discord, ['name' => 'ping', 'description' => 'Pong!']); $discord->application->commands->save($cmd);
Not working one
$cmd = new Command($discord); $cmd->setType(Command::CHAT_INPUT); $cmd->setName("ping"); $discord->application->commands->save($cmd);
Also, it is works fine for type 3 command
$cmd = new Command($discord); $cmd->setType(Command::MESSAGE); $cmd->setName("Ответить"); $discord->application->commands->save($cmd);
Error
Bad Request - { "code": 50035, "errors": { "description": { "_errors": [ { "code": "BASE_TYPE_REQUIRED", "message": "This field is required" } ] } }, "message": "Invalid Form Body" }
Slash command (type CHAT_INPUT) requires description, in which you missed $cmd->setDescription('Pong!') in the 2nd code.
$cmd->setDescription('Pong!')
Message context menu (type MESSAGE) doesn't require a description
Environment
Describe the bug Type 1 command trouble
Working one
Not working one
Also, it is works fine for type 3 command
Error