Skip to content

fix: sort integration types & contexts before comparing - #871

Merged
favna merged 2 commits into
sapphiredev:mainfrom
Lexouden:bugfix/unsorted-integration-types-and-contexts
Aug 22, 2026
Merged

fix: sort integration types & contexts before comparing#871
favna merged 2 commits into
sapphiredev:mainfrom
Lexouden:bugfix/unsorted-integration-types-and-contexts

Conversation

@Lexouden

Copy link
Copy Markdown
Contributor

This PR is basically a slightly simplified version of #866.

As the issue explains this currently causes any chat input command with contexts and/or integration_types to be diffed incorrectly triggering unnecessary command updates.

Fixes #865

@vladfrangu vladfrangu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a sorting function instead of default sorting behavior

@Lexouden

Lexouden commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Please use a sorting function instead of default sorting behavior

Oops, yeah. Forgot the default sorting converts the values to strings before comparing, considering these are numbers that could have caused issues.

@Lexouden
Lexouden requested a review from vladfrangu August 15, 2026 13:16
@favna
favna merged commit e1a2151 into sapphiredev:main Aug 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: command always updates when setIntegrationTypes or setContexts arrays are unsorted

3 participants