Skip to content

Commit

Permalink
refactor(guild): move premiumSubscriptionCount to AnonymousGuild (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx authored Feb 15, 2022
1 parent a8106f7 commit 6d3da22
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 8 additions & 0 deletions packages/discord.js/src/structures/AnonymousGuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ class AnonymousGuild extends BaseGuild {
*/
this.nsfwLevel = 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;
}
}

/**
Expand Down
8 changes: 0 additions & 8 deletions packages/discord.js/src/structures/Guild.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,6 @@ class Guild extends AnonymousGuild {
this.premiumTier = 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
Expand Down
2 changes: 1 addition & 1 deletion packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ export abstract class AnonymousGuild extends BaseGuild {
public banner: string | null;
public description: string | null;
public nsfwLevel: GuildNSFWLevel;
public premiumSubscriptionCount: number | null;
public splash: string | null;
public vanityURLCode: string | null;
public verificationLevel: GuildVerificationLevel;
Expand Down Expand Up @@ -961,7 +962,6 @@ export class Guild extends AnonymousGuild {
public mfaLevel: GuildMFALevel;
public ownerId: Snowflake;
public preferredLocale: string;
public premiumSubscriptionCount: number | null;
public premiumProgressBarEnabled: boolean;
public premiumTier: GuildPremiumTier;
public presences: PresenceManager;
Expand Down

0 comments on commit 6d3da22

Please sign in to comment.