Skip to content

Commit

Permalink
fix: return raw
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Mar 27, 2022
1 parent a29a2b6 commit 4fe618a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/lib/structures/Argument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ export class Argument {
if (this.type === ArgumentType.SUB_COMMAND || this.type === ArgumentType.SUB_COMMAND_GROUP) {
return {
name: this.name,
name_localizations: this.nameLocalizations,
description: this.description,
description_localizations: this.descriptionLocalizations,
type: this.type,
options: this.arguments?.map((argument) => argument.toJSON()),
};
Expand Down
6 changes: 3 additions & 3 deletions src/lib/structures/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class Command {
this.name = options.name || Command.defaults?.name;
this.nameLocalizations = options.nameLocalizations || Command.defaults?.nameLocalizations;
this.description = options.description || Command.defaults?.description;
this.descriptionLocalizations = options.descriptionLocalizations || Command.defaults.descriptionLocalizations;
this.descriptionLocalizations = options.descriptionLocalizations || Command.defaults?.descriptionLocalizations;
this.type = options.type || Command.defaults?.type;
this.arguments = options.arguments?.map((argument) => {
if (argument instanceof Argument) return argument;
Expand Down Expand Up @@ -160,9 +160,9 @@ export class Command {
if (type === CommandType.SLASH)
return {
name: this.name,
nameLocalizations: this.nameLocalizations,
name_localizations: this.nameLocalizations,
description: this.description,
descriptionLocalizations: this.descriptionLocalizations,
description_localizations: this.descriptionLocalizations,
options: this.arguments?.map((argument) => argument.toJSON()),
type: type,
};
Expand Down

0 comments on commit 4fe618a

Please sign in to comment.