From 84d714324ad65de94cfb3076daa8f6622a54e438 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Feb 2021 15:35:02 +0100 Subject: :sparkles: Schema interfaces --- src/Schema/Identify.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/Schema/Identify.ts') diff --git a/src/Schema/Identify.ts b/src/Schema/Identify.ts index 8775fac3..3a7182db 100644 --- a/src/Schema/Identify.ts +++ b/src/Schema/Identify.ts @@ -15,3 +15,19 @@ export const IdentifySchema = { $shard: [Number], $guild_subscriptions: Boolean, }; + +export interface IdentifySchema { + token: string; + properties: { + // bruh discord really uses $ in the property key, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key + $$os: string; + $$browser: string; + $$device: string; + }; + intents: bigint; // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt + presence?: ActivitySchema; + compress?: boolean; + large_threshold?: number; + shard?: [number]; + guild_subscriptions?: boolean; +} -- cgit 1.5.1