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: PartialGuildMember#id is not null #6840

Merged

Conversation

suneettipirneni
Copy link
Member

@suneettipirneni suneettipirneni commented Oct 14, 2021

Please describe the changes this PR makes and why it should be merged:

Closes #6839, This seems to fix a regression introduced in #6066

The docs say a user object is always provided in these events. So it shouldn't be nullable.

I also converted some empty interfaces into types.

Status and versioning classification:

Please move lines that apply to you out of the comment:

  • 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

@suneettipirneni suneettipirneni changed the title fix: PartialGuildMember#user is never null fix: PartialGuildMember#id is nullable Oct 14, 2021
@suneettipirneni suneettipirneni changed the title fix: PartialGuildMember#id is nullable fix: PartialGuildMember#id is not null Oct 14, 2021
@DTrombett
Copy link
Contributor

You're right! I didn't notice that user isn't nullable in my PR.
On another note, why are you converting interfaces to types? This isn't possible in PartialDMChannel where a property is overwritten and I'm pretty sure this wasn't done with other structures for this future possibility too.

@suneettipirneni
Copy link
Member Author

On another note, why are you converting interfaces to types? This isn't possible in PartialDMChannel where a property is overwritten and I'm pretty sure this wasn't done with other structures for this future possibility too.

Thanks for pointing this out, this has been reverted.

@iCrawl iCrawl merged commit 4dff279 into discordjs:main Oct 17, 2021
@suneettipirneni suneettipirneni deleted the typings/partial-guild-member-user branch October 18, 2021 13:32
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.

PartialGuildMember#user is possibly null, but PartialGuildMember#id exists?
5 participants