Skip to content

Commit

Permalink
fix(commands): fill new required properties
Browse files Browse the repository at this point in the history
required and tested for 247207
closes #81
  • Loading branch information
pylixonly committed Sep 6, 2024
1 parent 4b94b7f commit 32afc78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/api/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export function registerCommand(command: BunnyApplicationCommand): () => void {
command.type ??= ApplicationCommandType.CHAT;
command.inputType = ApplicationCommandInputType.BUILT_IN;
command.displayName ??= command.name;
command.untranslatedName ??= command.name;
command.displayDescription ??= command.description;
command.untranslatedDescription ??= command.description;

This comment has been minimized.

Copy link
@HC36d

HC36d Oct 3, 2024

Hi


if (command.options) for (const opt of command.options) {

This comment has been minimized.

Copy link
@HC36d

HC36d Oct 3, 2024

Good

opt.displayName ??= opt.name;
Expand Down
2 changes: 2 additions & 0 deletions src/lib/api/commands/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export interface ApplicationCommand {
applicationId?: string;
displayName?: string;
displayDescription?: string;
untranslatedDescription?: string;
untranslatedName?: string;

This comment has been minimized.

Copy link
@HC36d

HC36d Oct 3, 2024

Dlt this one

inputType?: ApplicationCommandInputType;
type?: ApplicationCommandType;

This comment has been minimized.

Copy link
@HC36d

HC36d Oct 3, 2024

Involved

__bunny?: {
Expand Down

0 comments on commit 32afc78

Please sign in to comment.