Fix MessageMentions properties always being null or empty (#1357)

This commit is contained in:
SpaceEEC
2017-04-10 20:06:00 +02:00
committed by Crawl
parent 0a56fa0aae
commit e60d2bd175
2 changed files with 3 additions and 3 deletions

View File

@@ -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) {