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:
izexi
2019-06-05 20:34:33 +01:00
committed by SpaceEEC
parent 405bdb5b55
commit c87758086b
5 changed files with 67 additions and 2 deletions

View File

@@ -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}