Skip to content

Commit

Permalink
🩹 Allow null descriptions on the command builder for context menus
Browse files Browse the repository at this point in the history
🩹 Add missing `nsfw` attribute to the command builder
🔧 Add the `guild_id` attribute to the command builder
  • Loading branch information
Log1x committed Jul 18, 2024
1 parent 58a9dfe commit 489ad72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Discord/Builders/CommandBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class CommandBuilder implements JsonSerializable
/**
* Description of the command. should be empty if the type is not CHAT_INPUT.
*
* @var string
* @var string|null
*/
protected string $description;
protected ?string $description = null;

/**
* The default permission of the command. If true the command is enabled when the app is added to the guild.
Expand Down Expand Up @@ -96,6 +96,8 @@ public function toArray(): array
'default_member_permissions',
'default_permission',
'dm_permission',
'guild_id',
'nsfw',
];

foreach ($optionals as $optional) {
Expand Down

0 comments on commit 489ad72

Please sign in to comment.