From 22b3dfe6c703d2c9c412716c583a4ee4ae2995e5 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Thu, 2 Mar 2023 18:26:25 +0700 Subject: [PATCH] feat: update flags --- src/util/PremiumUsageFlags.js | 7 ++++--- src/util/UserFlags.js | 4 ++-- typings/index.d.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/util/PremiumUsageFlags.js b/src/util/PremiumUsageFlags.js index 7b71ebb..2aede1e 100644 --- a/src/util/PremiumUsageFlags.js +++ b/src/util/PremiumUsageFlags.js @@ -17,14 +17,15 @@ class PremiumUsageFlags extends BitField {} /** * Numeric the Discord premium usage flags. All available properties: + * * `PREMIUM_DISCRIMINATOR` * * `ANIMATED_AVATAR` - * * `BANNER` - * * `CUSTOM_DISCRIMINATOR` + * * `PROFILE_BANNER` * @type {Object} */ PremiumUsageFlags.FLAGS = { + PREMIUM_DISCRIMINATOR: 1 << 0, ANIMATED_AVATAR: 1 << 1, - BANNER: 1 << 2, + PROFILE_BANNER: 1 << 2, }; module.exports = PremiumUsageFlags; diff --git a/src/util/UserFlags.js b/src/util/UserFlags.js index f60ef2e..5808739 100644 --- a/src/util/UserFlags.js +++ b/src/util/UserFlags.js @@ -97,8 +97,8 @@ UserFlags.FLAGS = { DISABLED: Math.pow(2, 41), // [Undocumented] User is currently temporarily or permanently disabled. VERIFIED_EMAIL: Math.pow(2, 43), // [Undocumented] User has a verified email on their account. QUARANTINED: Math.pow(2, 44), // [Undocumented] User is quarantined. - COLLABORATOR: Math.pow(2, 50), // [Undocumented] User is a collaborator and has staff permissions. - RESTRICTED_COLLABORATOR: Math.pow(2, 51), // [Undocumented] User is a restricted collaborator and has staff permissions. + COLLABORATOR: 1 << 50, // [Undocumented] User is a collaborator and has staff permissions. + RESTRICTED_COLLABORATOR: 1 << 51, // [Undocumented] User is a restricted collaborator and has staff permissions. }; module.exports = UserFlags; diff --git a/typings/index.d.ts b/typings/index.d.ts index 0de1adb..a24bca2 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -4460,7 +4460,7 @@ export interface WebhookFields extends PartialWebhookFields { //#region Typedefs export type PurchasedFlagsString = 'NITRO_CLASSIC' | 'NITRO' | 'GUILD_BOOST'; -export type PremiumUsageFlagsString = 'ANIMATED_AVATAR' | 'BANNER' | 'CUSTOM_DISCRIMINATOR'; +export type PremiumUsageFlagsString = 'PREMIUM_DISCRIMINATOR' | 'ANIMATED_AVATAR' | 'PROFILE_BANNER'; export type ActivityFlagsString = | 'INSTANCE'