summary refs log tree commit diff
path: root/src/Schema/Identify.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-05 21:55:07 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-05 21:55:07 +0100
commit9b7f4e2b66bd978c3903b352ee1811e80848a24a (patch)
tree4f537890f27f44b95d7057e41ae3c32be08a1791 /src/Schema/Identify.ts
parent:bug: make default options optional (diff)
downloadserver-9b7f4e2b66bd978c3903b352ee1811e80848a24a.tar.xz
Move Models/Schemas to server-util
Diffstat (limited to 'src/Schema/Identify.ts')
-rw-r--r--src/Schema/Identify.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Schema/Identify.ts b/src/Schema/Identify.ts
new file mode 100644

index 00000000..8775fac3 --- /dev/null +++ b/src/Schema/Identify.ts
@@ -0,0 +1,17 @@ +import { ActivitySchema } from "./Activity"; + +export const 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, +};