Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(User): compare flags in #equals #6750

Merged
merged 2 commits into from Oct 4, 2021
Merged

Conversation

ImRodry
Copy link
Contributor

@ImRodry ImRodry commented Oct 3, 2021

Please describe the changes this PR makes and why it should be merged:
This PR compares the users' flags in User#equals. I had to create a new _equals method to be used in actions as these compare a user object with an API user, which does not have the same properties as a Discord.js User and thus would always return false when used this way. This wasn't necessarily needed as the user update action compares 2 User objects, but it's better than having broken code. Alternatively we can drop the checks on the GuildMemberUpdate and PresenceUpdate actions and this function won't be needed, let me know what you prefer

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@iCrawl iCrawl merged commit 00e1e26 into discordjs:main Oct 4, 2021
@ImRodry ImRodry deleted the fix-user-equals branch October 4, 2021 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants