summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-23 18:42:30 +0200
committerGitHub <noreply@github.com>2021-05-23 18:42:30 +0200
commit5cf40aa1dc57d83c8676a2c83f4254aa2694998b (patch)
tree6e3217d22bf54db0013e79453133923acf846718
parent1.2.8 (diff)
parentModels: User can have a NULL email in case it is an unclaimed account (diff)
downloadserver-5cf40aa1dc57d83c8676a2c83f4254aa2694998b.tar.xz
Merge pull request #6 from DiegoMagdaleno/master
Fix compilation with StrictNullChecks and make the properties have more sense
-rw-r--r--src/models/Event.ts2
-rw-r--r--src/models/User.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/models/Event.ts b/src/models/Event.ts

index d4c00812..6f2a7444 100644 --- a/src/models/Event.ts +++ b/src/models/Event.ts
@@ -53,7 +53,7 @@ export interface ReadyEventData { flags: bigint; mfa_enabled: boolean; nsfw_allowed: boolean; - phone: string; + phone: string | null; premium: boolean; premium_type: number; verified: boolean; diff --git a/src/models/User.ts b/src/models/User.ts
index 8cec334b..2b4f43b9 100644 --- a/src/models/User.ts +++ b/src/models/User.ts
@@ -16,7 +16,7 @@ export interface User { username: string; // username max length 32, min 2 discriminator: string; // #0001 4 digit long string from #0001 - #9999 avatar: string | null; // hash of the user avatar - phone?: string; // phone number of the user + phone: string | null; // phone number of the user desktop: boolean; // if the user has desktop app installed mobile: boolean; // if the user has mobile app installed premium: boolean; // if user bought nitro @@ -27,7 +27,7 @@ export interface User { mfa_enabled: boolean; // if multi factor authentication is enabled created_at: Date; // registration date verified: boolean; // if the user is offically verified - email?: string; // email of the user + email: string | null; // email of the user flags: bigint; // UserFlags public_flags: bigint; user_settings: UserSettings; @@ -57,7 +57,7 @@ export interface PublicUser { id: string; discriminator: string; username: string; - avatar?: string; + avatar: string | null; public_flags: bigint; }