Skip to content

Commit c88aaf6

Browse files
committed
fix: ensure metadata.guilds is an array before validation
1 parent 761340e commit c88aaf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/commandkit/src/app/handlers/AppCommandHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ export class AppCommandHandler {
556556
}
557557

558558
if (
559-
loadedCommand.metadata?.guilds &&
559+
loadedCommand.metadata?.guilds?.length &&
560560
!loadedCommand.metadata.guilds.includes(source.guildId)
561561
) {
562562
return null; // command is being called in a guild that is not in the metadata

0 commit comments

Comments
 (0)