Is there an existing issue for this?
Description of the bug
Whenever you register a command and use either setIntegrationTypes or setContexts. If you put the enums in an unsorted non-ascending order (ex. 2,1,0; 0,2,1; 2,0,1; etc). The command is always detected as different and is updated, even when the actual integration types or contexts didn't change, increasing load times by a lot.
Steps To Reproduce
- In any command, set integration types or contexts values in an unsorted order. Ex:
builder.setIntegrationTypes([
ApplicationIntegrationType.UserInstall, // = 1
ApplicationIntegrationType.GuildInstall, // = 0
]);
- Set the command's
behaviorWhenNotIdentical to RegisterBehavior.VerboseOverwrite
- Set client's logger level to
LogLevel.Debug
Each time the command is loaded, it'll say that it found differences and updates the command, even if you don't change the actual integration types.
Expected behavior
The command shouldn't be updated because there weren't any actual differences.
Screenshots
With non-sorted values:

Once the values are sorted:

Additional context
No response
System Info
System:
OS: Linux 6.19 Arch Linux
CPU: (16) x64 AMD Ryzen 7 7730U with Radeon Graphics
Memory: 2.80 GB / 15.02 GB
Container: Yes
Shell: 4.6.0 - /usr/bin/fish
Binaries:
Node: 25.9.0 - /usr/bin/node
npm: 11.12.1 - /usr/bin/npm
pnpm: 10.33.0 - /usr/bin/pnpm
bun: 1.3.11 - /home/angel/.bun/bin/bun
Browsers:
Chromium: 146.0.7680.177
Is there an existing issue for this?
Description of the bug
Whenever you register a command and use either
setIntegrationTypesorsetContexts. If you put the enums in an unsorted non-ascending order (ex. 2,1,0; 0,2,1; 2,0,1; etc). The command is always detected as different and is updated, even when the actual integration types or contexts didn't change, increasing load times by a lot.Steps To Reproduce
behaviorWhenNotIdenticaltoRegisterBehavior.VerboseOverwriteLogLevel.DebugEach time the command is loaded, it'll say that it found differences and updates the command, even if you don't change the actual integration types.
Expected behavior
The command shouldn't be updated because there weren't any actual differences.
Screenshots
With non-sorted values:

Once the values are sorted:

Additional context
No response
System Info
System: OS: Linux 6.19 Arch Linux CPU: (16) x64 AMD Ryzen 7 7730U with Radeon Graphics Memory: 2.80 GB / 15.02 GB Container: Yes Shell: 4.6.0 - /usr/bin/fish Binaries: Node: 25.9.0 - /usr/bin/node npm: 11.12.1 - /usr/bin/npm pnpm: 10.33.0 - /usr/bin/pnpm bun: 1.3.11 - /home/angel/.bun/bin/bun Browsers: Chromium: 146.0.7680.177