From 0c6ba7a21133ed3a77ba29e9478875233861fd52 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 12 Nov 2022 09:53:38 +0700 Subject: [PATCH] feat: Update UserFlags & ApplicationFlags --- src/util/ApplicationFlags.js | 19 +++++++++++++++++++ src/util/Options.js | 2 +- src/util/UserFlags.js | 6 +++--- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/util/ApplicationFlags.js b/src/util/ApplicationFlags.js index ba058f7..ea66ee2 100644 --- a/src/util/ApplicationFlags.js +++ b/src/util/ApplicationFlags.js @@ -23,6 +23,14 @@ class ApplicationFlags extends BitField {} /** * Numeric application flags. All available properties: + * * `EMBEDDED_RELEASED` + * * `MANAGED_EMOJI` + * * `GROUP_DM_CREATE` + * * `RPC_PRIVATE_BETA` + * * `ALLOW_ASSETS` + * * `ALLOW_ACTIVITY_ACTION_SPECTATE` + * * `ALLOW_ACTIVITY_ACTION_JOIN_REQUEST` + * * `RPC_HAS_CONNECTED` * * `GATEWAY_PRESENCE` * * `GATEWAY_PRESENCE_LIMITED` * * `GATEWAY_GUILD_MEMBERS` @@ -33,10 +41,20 @@ class ApplicationFlags extends BitField {} * * `GATEWAY_MESSAGE_CONTENT_LIMITED` * * `EMBEDDED_FIRST_PARTY` * * `APPLICATION_COMMAND_BADGE` + * * `ACTIVE` * @type {Object} * @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags} + * @see {@link https://flags.lewistehminerz.dev/} */ ApplicationFlags.FLAGS = { + EMBEDDED_RELEASED: 1 << 1, + MANAGED_EMOJI: 1 << 2, + GROUP_DM_CREATE: 1 << 4, + RPC_PRIVATE_BETA: 1 << 5, + ALLOW_ASSETS: 1 << 8, + ALLOW_ACTIVITY_ACTION_SPECTATE: 1 << 9, + ALLOW_ACTIVITY_ACTION_JOIN_REQUEST: 1 << 10, + RPC_HAS_CONNECTED: 1 << 11, GATEWAY_PRESENCE: 1 << 12, GATEWAY_PRESENCE_LIMITED: 1 << 13, GATEWAY_GUILD_MEMBERS: 1 << 14, @@ -47,6 +65,7 @@ ApplicationFlags.FLAGS = { GATEWAY_MESSAGE_CONTENT_LIMITED: 1 << 19, EMBEDDED_FIRST_PARTY: 1 << 20, APPLICATION_COMMAND_BADGE: 1 << 23, + ACTIVE: 1 << 24, }; module.exports = ApplicationFlags; diff --git a/src/util/Options.js b/src/util/Options.js index 625aa6c..7056bba 100644 --- a/src/util/Options.js +++ b/src/util/Options.js @@ -190,7 +190,7 @@ class Options extends null { referrer_current: '', referring_domain_current: '', release_channel: 'stable', - client_build_number: 156904, + client_build_number: 157708, client_event_source: null, }, // ? capabilities: 2045, diff --git a/src/util/UserFlags.js b/src/util/UserFlags.js index 85ac261..7af57bc 100644 --- a/src/util/UserFlags.js +++ b/src/util/UserFlags.js @@ -80,9 +80,9 @@ UserFlags.FLAGS = { EARLY_VERIFIED_BOT_DEVELOPER: 1 << 17, DISCORD_CERTIFIED_MODERATOR: 1 << 18, BOT_HTTP_INTERACTIONS: 1 << 19, - SPAMMER: Math.pow(2, 20), // [Undocumented] User is marked as a spammer. - DISABLE_PREMIUM: Math.pow(2, 21), // [Undocumented] Forcefully disables Nitro features. - ACTIVE_DEVELOPER: Math.pow(2, 22), // User is an active developer. + SPAMMER: 1 << 20, // [Undocumented] User is marked as a spammer. + DISABLE_PREMIUM: 1 << 21, // [Undocumented] Forcefully disables Nitro features. + ACTIVE_DEVELOPER: 1 << 22, // User is an active developer. HIGH_GLOBAL_RATE_LIMIT: Math.pow(2, 33), // [Undocumented] User is a high global rate limit. DELETED: Math.pow(2, 34), // [Undocumented] Account has been deleted. DISABLED_SUSPICIOUS_ACTIVITY: Math.pow(2, 35), // [Undocumented] Account has been disabled for suspicious activity.