Skip to content

Commit 61e96d2

Browse files
authoredFeb 8, 2023
fix(Command): Do not attempt to execute application command reloading logic when a command does not have any application commands (#598)
1 parent b243bcd commit 61e96d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/lib/structures/Command.ts

+5
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ export class Command<PreParseReturn = Args, O extends Command.Options = Command.
299299
}
300300
}
301301

302+
// If there are no API calls to execute then exit out early
303+
if (!updatedRegistry['apiCalls'].length) {
304+
return;
305+
}
306+
302307
// If the default behavior is set to bulk overwrite, handle it as such and return.
303308
if (getDefaultBehaviorWhenNotIdentical() === RegisterBehavior.BulkOverwrite) {
304309
await handleBulkOverwrite(store, this.container.client.application!.commands);

0 commit comments

Comments
 (0)
Please sign in to comment.