From e60d2bd17546525cb2ee638c4f8aaa14033e16ec Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Mon, 10 Apr 2017 20:06:00 +0200 Subject: [PATCH] Fix MessageMentions properties always being null or empty (#1357) --- src/structures/Message.js | 2 +- src/structures/MessageMentions.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 0cc20251b..5f191c26d 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -127,7 +127,7 @@ class Message { * All valid mentions that the message contains * @type {MessageMentions} */ - this.mentions = new Mentions(this, data.mentions, data.mentions_roles, data.mention_everyone); + this.mentions = new Mentions(this, data.mentions, data.mention_roles, data.mention_everyone); /** * ID of the webhook that sent the message, if applicable diff --git a/src/structures/MessageMentions.js b/src/structures/MessageMentions.js index 148ba98e2..a2c979763 100644 --- a/src/structures/MessageMentions.js +++ b/src/structures/MessageMentions.js @@ -84,7 +84,7 @@ class MessageMentions { */ get members() { if (this._members) return this._members; - if (!this.guild) return null; + if (!this._guild) return null; this._members = new Collection(); this.users.forEach(user => { const member = this._guild.member(user); @@ -100,7 +100,7 @@ class MessageMentions { */ get channels() { if (this._channels) return this._channels; - if (!this.guild) return null; + if (!this._guild) return null; this._channels = new Collection(); let matches; while ((matches = this.constructor.CHANNELS_PATTERN.exec(this._content)) !== null) {