diff --git a/src/structures/User.js b/src/structures/User.js index f12d67ffa..2a184b1d4 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -20,6 +20,13 @@ class User extends Base { */ this.id = data.id; + /** + * Whether or not the user is a bot + * @type {boolean} + * @name User#bot + */ + this.bot = Boolean(data.bot); + this._patch(data); } @@ -40,18 +47,11 @@ class User extends Base { /** * The ID of the user's avatar - * @type {string} + * @type {?string} * @name User#avatar */ if (typeof data.avatar !== 'undefined') this.avatar = data.avatar; - /** - * Whether or not the user is a bot - * @type {boolean} - * @name User#bot - */ - if (typeof this.bot === 'undefined' && typeof data.bot !== 'undefined') this.bot = Boolean(data.bot); - /** * The ID of the last message sent by the user, if one was sent * @type {?Snowflake}