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: don't patch set data with undefined #6694

Merged
merged 1 commit into from Oct 3, 2021

Conversation

ImRodry
Copy link
Contributor

@ImRodry ImRodry commented Sep 25, 2021

Please describe the changes this PR makes and why it should be merged:
This PR fixes a bug across the entire library where some properties could be lost by calling ._patch. The diff is quite large because this fix was applied to all _patch methods on the library on all properties except ids. If you do not agree with some of the changes, feel free to leave a review and we can discuss them as I understand some of these may be redundant, but it's always better to be sure. Fixes #6688

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

@ImRodry
Copy link
Contributor Author

ImRodry commented Sep 28, 2021

Rebased and decided not to apply the 'ephemeral' in data check for MessageAttachment#ephemeral since that is intentionally not sent for the library to infer that the property is false, so it should always be set by us

@iCrawl iCrawl merged commit 9eb9591 into discordjs:main Oct 3, 2021
@ImRodry ImRodry deleted the fix-patch-undefined branch October 3, 2021 13:01
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.

Bug: Voice channel loses properties after being received as interaction option
5 participants