No bigints in identify

This commit is contained in:
Rory&
2026-10-12 19:36:18 +02:00
parent 6cea7578d5
commit f6d5ceab75
5 changed files with 5 additions and 5 deletions
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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?: {