Skip to content

Commit a257905

Browse files
authored
fix(ApplicationCommand): remove false positives in equals
This fixes a bug where having a local command that doesn't declare integrationTypes explicitly would cause it to not be equal to the command returned by Discord as they send a default value of [ 0 ]
1 parent c45d912 commit a257905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/discord.js/src/structures/ApplicationCommand.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ class ApplicationCommand extends Base {
418418
command.descriptionLocalizations ?? command.description_localizations ?? {},
419419
this.descriptionLocalizations ?? {},
420420
) ||
421-
!isEqual(command.integrationTypes ?? command.integration_types ?? [], this.integrationTypes ?? []) ||
421+
!isEqual(command.integrationTypes ?? command.integration_types ?? [0], this.integrationTypes ?? []) ||
422422
!isEqual(command.contexts ?? [], this.contexts ?? [])
423423
) {
424424
return false;

0 commit comments

Comments
 (0)