From f6d5ceab7517459fb19c6ceff03eba898cd5bc88 Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 12 Oct 2026 19:36:18 +0200 Subject: [PATCH] No bigints in identify --- assets/openapi.json | Bin 1107942 -> 1107742 bytes assets/schemas.json | Bin 520011 -> 519843 bytes src/gateway/opcodes/Identify.ts | 2 +- src/gateway/util/WebSocket.ts | 4 ++-- src/schemas/gateway/IdentifySchema.ts | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/openapi.json b/assets/openapi.json index b614cb38a08628e59956d3a902e7a3c4e831d7fd..9dcd1d2dd0a65f8fba10a5e1bbe4de6c3f80d105 100644 GIT binary patch delta 96 zcmaEM-g(|R=Y|%>7N!>FEiAt7)6_Z4r>}p^#J2sFJ4+eU^aFR;{ii3)U}kHV^=1KL kRv-qk*@2h?h&h3n3y8Uam7N!>FEiAt7(;L39NlteVW8|D%AjLO*f*YstbOT0Kqv>lOGjVM1 za%U-Hf+)GLhLLA-z7#)5iS%@Zc|2^>3&NO9raRo^6rVmJoJF=h)Qbg(S%H`hh}nUd d1Bf|+m)A9W3-Ity7MRA?{$e9D5VHU= OD-g47f3cB0*%kms>>D!x delta 119 zcmZ2{SN`-p`Gyw87N#xC@7GPA@P=7%`i3d&oYNopGg(efuwb1YaF|hcdO;Z@$99?Z z%+DF&N;sxJ=wT9`{>~prTySP&ojl>a3`jBW^aBr=SSA}J$xRlR#@6nzkr{|tfS47C M*|s}uWKXsQ0CzDi?EnA( diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 81a65a3ee..3b0093171 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -128,7 +128,7 @@ export async function onIdentify(this: WebSocket, data: Payload) { const userQueryTime = taskSw.getElapsedAndReset(); // Check intents - if (!identify.intents) identify.intents = 0b11011111111111111111111111111111111n; // TODO: what is this number? + if (!identify.intents) identify.intents = 0b11011111111111111111111111111111111; // TODO: what is this number? this.intents = new Intents(identify.intents); // TODO: actually do intent things. diff --git a/src/gateway/util/WebSocket.ts b/src/gateway/util/WebSocket.ts index 50c7bbb14..11e874d11 100644 --- a/src/gateway/util/WebSocket.ts +++ b/src/gateway/util/WebSocket.ts @@ -35,8 +35,8 @@ export interface WebSocket extends WS { ipAddress?: string; userAgent?: string; // for cdn request signing fingerprint?: string; - shard_count?: bigint; - shard_id?: bigint; + shard_count?: number; + shard_id?: number; deflate?: Deflate; inflate?: Inflate; zstdEncoder?: Encoder; diff --git a/src/schemas/gateway/IdentifySchema.ts b/src/schemas/gateway/IdentifySchema.ts index 3e5006f3f..654ca1395 100644 --- a/src/schemas/gateway/IdentifySchema.ts +++ b/src/schemas/gateway/IdentifySchema.ts @@ -109,7 +109,7 @@ export interface IdentifySchema { system_locale?: string; qos_token?: string; }; - intents?: bigint; // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt + intents?: number; presence?: ActivitySchema; compress?: boolean; large_threshold?: number; @@ -118,7 +118,7 @@ export interface IdentifySchema { * @minItems 2 * @maxItems 2 */ - shard?: bigint[]; // puyo: changed from [bigint, bigint] because it breaks openapi + shard?: number[]; // puyo: changed from [bigint, bigint] because it breaks openapi guild_subscriptions?: boolean; capabilities?: number; client_state?: {