Skip to content

Commit

Permalink
Context menus can't have descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
BaeFell committed Jul 11, 2024
1 parent 48a2749 commit 2ead51e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Discord/Builders/CommandBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,12 @@ public function toArray(): array
{
$arrCommand = [
'name' => $this->name,
'description' => $this->description,
];

if ($this->type === Command::CHAT_INPUT) {
$arrCommand['description'] = $this->description;
}

$optionals = [
'type',
'name_localizations',
Expand Down

0 comments on commit 2ead51e

Please sign in to comment.