From 5091f6e70774fd97ec7dd3ae3f500c3850f81d94 Mon Sep 17 00:00:00 2001 From: Almeida Date: Sat, 29 Oct 2022 14:20:27 +0100 Subject: [PATCH] fix(UserFlags): hardcode the value of `Quarantined` (#624) --- deno/payloads/v10/user.ts | 6 +++++- deno/payloads/v9/user.ts | 8 ++++++-- payloads/v10/user.ts | 6 +++++- payloads/v9/user.ts | 8 ++++++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/deno/payloads/v10/user.ts b/deno/payloads/v10/user.ts index 5ede917c5..7de5d7d7f 100644 --- a/deno/payloads/v10/user.ts +++ b/deno/payloads/v10/user.ts @@ -151,8 +151,12 @@ export enum UserFlags { * User's account has been quarantined based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. + * + * @privateRemarks + * + * This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints */ - Quarantined = Math.pow(2, 44), + Quarantined = 17592186044416, } /** diff --git a/deno/payloads/v9/user.ts b/deno/payloads/v9/user.ts index 538ea8b59..40a684dcb 100644 --- a/deno/payloads/v9/user.ts +++ b/deno/payloads/v9/user.ts @@ -150,9 +150,13 @@ export enum UserFlags { /** * User's account has been quarantined based on recent activity * - * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. + * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.~ + * + * @privateRemarks + * + * This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints */ - Quarantined = Math.pow(2, 44), + Quarantined = 17592186044416, } /** diff --git a/payloads/v10/user.ts b/payloads/v10/user.ts index 39439aa07..afb98f7cb 100644 --- a/payloads/v10/user.ts +++ b/payloads/v10/user.ts @@ -151,8 +151,12 @@ export enum UserFlags { * User's account has been quarantined based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. + * + * @privateRemarks + * + * This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints */ - Quarantined = Math.pow(2, 44), + Quarantined = 17592186044416, } /** diff --git a/payloads/v9/user.ts b/payloads/v9/user.ts index eb015b1de..687376eb4 100644 --- a/payloads/v9/user.ts +++ b/payloads/v9/user.ts @@ -150,9 +150,13 @@ export enum UserFlags { /** * User's account has been quarantined based on recent activity * - * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. + * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.~ + * + * @privateRemarks + * + * This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints */ - Quarantined = Math.pow(2, 44), + Quarantined = 17592186044416, } /**