mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
feat: add support for premium guilds (#3316)
* add premiumTier and premiumSubscriptionCount * add premiumSinceTimestamp and premiumSince * add premium message types * typings * add GuildEmoji#available * fix doc description
This commit is contained in:
@@ -188,6 +188,30 @@ class Guild extends Base {
|
||||
*/
|
||||
this.embedEnabled = data.embed_enabled;
|
||||
|
||||
/**
|
||||
* The type of premium tier:
|
||||
* * 0: NONE
|
||||
* * 1: TIER_1
|
||||
* * 2: TIER_2
|
||||
* * 3: TIER_3
|
||||
* @typedef {number} PremiumTier
|
||||
*/
|
||||
|
||||
/**
|
||||
* The premium tier on this guild
|
||||
* @type {PremiumTier}
|
||||
*/
|
||||
this.premiumTier = data.premium_tier;
|
||||
|
||||
/**
|
||||
* The total number of users currently boosting this server
|
||||
* @type {?number}
|
||||
* @name Guild#premiumSubscriptionCount
|
||||
*/
|
||||
if (typeof data.premium_subscription_count !== 'undefined') {
|
||||
this.premiumSubscriptionCount = data.premium_subscription_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether widget images are enabled on this guild
|
||||
* @type {?boolean}
|
||||
|
||||
Reference in New Issue
Block a user