Skip to content

types(Invite): Approximate fields should be nullable #10997

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

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

Jiralite
Copy link
Member

@Jiralite Jiralite commented Jul 16, 2025

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

One of the fixes from #10888 applies here:

if ('approximate_presence_count' in data) {
/**
* The approximate number of online members of the guild this invite is for
* <info>This is only available when the invite was fetched through {@link Client#fetchInvite}.</info>
* @type {?number}
*/
this.presenceCount = data.approximate_presence_count;
} else {
this.presenceCount ??= null;
}
if ('approximate_member_count' in data) {
/**
* The approximate total number of members of the guild this invite is for
* <info>This is only available when the invite was fetched through {@link Client#fetchInvite}.</info>
* @type {?number}
*/
this.memberCount = data.approximate_member_count;
} else {
this.memberCount ??= null;
}

May be reproduced by creating an invite.

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

@Jiralite Jiralite added this to the discord.js 14.22.0 milestone Jul 16, 2025
@Jiralite Jiralite requested a review from a team as a code owner July 16, 2025 16:56
@Jiralite Jiralite requested review from vladfrangu and iCrawl and removed request for a team July 16, 2025 16:56
@Jiralite Jiralite requested review from kyranet and SpaceEEC July 16, 2025 16:56
Copy link

vercel bot commented Jul 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Jul 16, 2025 4:56pm
discord-js-guide ⬜️ Ignored (Inspect) Jul 16, 2025 4:56pm

@github-project-automation github-project-automation bot moved this from Todo to Review Approved in discord.js Jul 16, 2025
@almeidx almeidx merged commit d60e0bf into v14 Jul 16, 2025
10 checks passed
@almeidx almeidx deleted the fix/invite-fields-null branch July 16, 2025 22:41
@github-project-automation github-project-automation bot moved this from Review Approved to Done in discord.js Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy