From 718f61a73224d2b317770d6069cbf1caeb78632d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 19 Sep 2016 19:36:14 -0400 Subject: [PATCH] Fix various Guild properties getting unset --- src/structures/Guild.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 9290c8cc0..eef92fca8 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -92,13 +92,13 @@ class Guild { * The full amount of members in this Guild as of `READY` * @type {number} */ - this.memberCount = data.member_count; + this.memberCount = data.member_count || this.memberCount; /** * Whether the guild is "large" (has more than 250 members) * @type {boolean} */ - this.large = data.large; + this.large = data.large || this.large; /** * An array of guild features. @@ -139,8 +139,8 @@ class Guild { this.id = data.id; this.available = !data.unavailable; - this.features = data.features || []; - this._joinDate = new Date(data.joined_at).getTime(); + this.features = data.features || this.features || []; + this._joinedTimestamp = data.joined_at ? new Date(data.joined_at).getTime() : this._joinedTimestamp; if (data.members) { this.members.clear(); @@ -210,7 +210,7 @@ class Guild { * @type {Date} */ get joinDate() { - return new Date(this._joinDate); + return new Date(this._joinedTimestamp); } /**