mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
refactor(guild): move premiumSubscriptionCount to AnonymousGuild (#7451)
This commit is contained in:
@@ -63,6 +63,14 @@ class AnonymousGuild extends BaseGuild {
|
|||||||
*/
|
*/
|
||||||
this.nsfwLevel = data.nsfw_level;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -209,14 +209,6 @@ class Guild extends AnonymousGuild {
|
|||||||
this.premiumTier = data.premium_tier;
|
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) {
|
if ('widget_enabled' in data) {
|
||||||
/**
|
/**
|
||||||
* Whether widget images are enabled on this guild
|
* Whether widget images are enabled on this guild
|
||||||
|
|||||||
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -215,6 +215,7 @@ export abstract class AnonymousGuild extends BaseGuild {
|
|||||||
public banner: string | null;
|
public banner: string | null;
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
public nsfwLevel: GuildNSFWLevel;
|
public nsfwLevel: GuildNSFWLevel;
|
||||||
|
public premiumSubscriptionCount: number | null;
|
||||||
public splash: string | null;
|
public splash: string | null;
|
||||||
public vanityURLCode: string | null;
|
public vanityURLCode: string | null;
|
||||||
public verificationLevel: GuildVerificationLevel;
|
public verificationLevel: GuildVerificationLevel;
|
||||||
@@ -961,7 +962,6 @@ export class Guild extends AnonymousGuild {
|
|||||||
public mfaLevel: GuildMFALevel;
|
public mfaLevel: GuildMFALevel;
|
||||||
public ownerId: Snowflake;
|
public ownerId: Snowflake;
|
||||||
public preferredLocale: string;
|
public preferredLocale: string;
|
||||||
public premiumSubscriptionCount: number | null;
|
|
||||||
public premiumProgressBarEnabled: boolean;
|
public premiumProgressBarEnabled: boolean;
|
||||||
public premiumTier: GuildPremiumTier;
|
public premiumTier: GuildPremiumTier;
|
||||||
public presences: PresenceManager;
|
public presences: PresenceManager;
|
||||||
|
|||||||
Reference in New Issue
Block a user