mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: Add premiumSubscriptionCount to InviteGuild (#7629)
This commit is contained in:
@@ -64,6 +64,16 @@ class AnonymousGuild extends BaseGuild {
|
||||
*/
|
||||
this.nsfwLevel = NSFWLevels[data.nsfw_level];
|
||||
}
|
||||
|
||||
if ('premium_subscription_count' in data) {
|
||||
/**
|
||||
* The total number of boosts for this server
|
||||
* @type {?number}
|
||||
*/
|
||||
this.premiumSubscriptionCount = data.premium_subscription_count;
|
||||
} else {
|
||||
this.premiumSubscriptionCount ??= null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -286,14 +286,6 @@ class Guild extends AnonymousGuild {
|
||||
this.premiumTier = PremiumTiers[data.premium_tier];
|
||||
}
|
||||
|
||||
if ('premium_subscription_count' in data) {
|
||||
/**
|
||||
* The total number of boosts for this server
|
||||
* @type {?number}
|
||||
*/
|
||||
this.premiumSubscriptionCount = data.premium_subscription_count;
|
||||
}
|
||||
|
||||
if ('widget_enabled' in data) {
|
||||
/**
|
||||
* Whether widget images are enabled on this guild
|
||||
|
||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -184,6 +184,7 @@ export abstract class AnonymousGuild extends BaseGuild {
|
||||
public banner: string | null;
|
||||
public description: string | null;
|
||||
public nsfwLevel: NSFWLevel;
|
||||
public premiumSubscriptionCount: number | null;
|
||||
public splash: string | null;
|
||||
public vanityURLCode: string | null;
|
||||
public verificationLevel: VerificationLevel;
|
||||
@@ -905,7 +906,6 @@ export class Guild extends AnonymousGuild {
|
||||
public mfaLevel: MFALevel;
|
||||
public ownerId: Snowflake;
|
||||
public preferredLocale: string;
|
||||
public premiumSubscriptionCount: number | null;
|
||||
public premiumProgressBarEnabled: boolean;
|
||||
public premiumTier: PremiumTier;
|
||||
public presences: PresenceManager;
|
||||
|
||||
Reference in New Issue
Block a user