From d024ec5bf4e101eb775efc0c86d68c2426e19e58 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 11 Sep 2022 23:19:33 +0700 Subject: [PATCH] fix(ClientUser): Bio is null Reported by Void.#0176 --- src/structures/ClientUser.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 61a2f0e..7427dfc 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -38,12 +38,12 @@ class ClientUser extends User { // Todo: Add (Selfbot) if ('premium_type' in data) { - const nitro = NitroType[data.premium_type]; + const nitro = NitroType[data.premium_type ?? 0]; /** * Nitro type of the client user. * @type {NitroType} */ - this.nitroType = nitro ?? `UNKNOWN_${data.premium_type}`; + this.nitroType = nitro ?? `UNKNOWN_TYPE_${data.premium_type}`; } if ('purchased_flags' in data) { /** @@ -74,6 +74,9 @@ class ClientUser extends User { */ this.emailAddress = data.email; } + if ('bio' in data) { + this.bio = data.bio; + } } /**