Skip to content

Commit

Permalink
fix(Command): Do not attempt to execute application command reloading…
Browse files Browse the repository at this point in the history
… logic when a command does not have any application commands (#598)
  • Loading branch information
favna committed Feb 8, 2023
1 parent b243bcd commit 61e96d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/structures/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ export class Command<PreParseReturn = Args, O extends Command.Options = Command.
}
}

// If there are no API calls to execute then exit out early
if (!updatedRegistry['apiCalls'].length) {
return;
}

// If the default behavior is set to bulk overwrite, handle it as such and return.
if (getDefaultBehaviorWhenNotIdentical() === RegisterBehavior.BulkOverwrite) {
await handleBulkOverwrite(store, this.container.client.application!.commands);
Expand Down

0 comments on commit 61e96d2

Please sign in to comment.