Skip to content

Commit

Permalink
dont require description if command type isnt CHAT_INPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Sep 14, 2024
1 parent 4922122 commit 53a400c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util/builder/commandBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ class Command {
throw new RangeError(
`GLUON: Command name must be between ${LIMITS.MIN_COMMAND_NAME} and ${LIMITS.MAX_COMMAND_NAME} characters.`,
);
if (!this.description)
if (
!this.description &&
this.type === APPLICATION_COMMAND_TYPES.CHAT_INPUT
)
throw new TypeError("GLUON: Command description must be provided.");
if (typeof this.description !== "string")
throw new TypeError("GLUON: Command description must be a string.");
Expand Down

0 comments on commit 53a400c

Please sign in to comment.