From db512d8f6281b9d6436df5256f02aeb504462295 Mon Sep 17 00:00:00 2001 From: Jan <66554238+Vaporox@users.noreply.github.com> Date: Sat, 15 Aug 2020 20:04:32 +0200 Subject: [PATCH] fix(User): set User#bot to false if not partial (#4706) Co-authored-by: Noel --- src/structures/User.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/structures/User.js b/src/structures/User.js index e073f988e..97cfc94a2 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -30,15 +30,6 @@ class User extends Base { } _patch(data) { - if (typeof this.bot !== 'boolean') { - /** - * Whether or not the user is a bot - * @type {?boolean} - * @name User#bot - */ - this.bot = 'bot' in data ? Boolean(data.bot) : null; - } - if ('username' in data) { /** * The username of the user @@ -50,6 +41,13 @@ class User extends Base { this.username = null; } + /** + * Whether or not the user is a bot + * @type {?boolean} + * @name User#bot + */ + this.bot = Boolean(data.bot); + if ('discriminator' in data) { /** * A discriminator based on username for the user