Fixed isMentioned

This commit is contained in:
abalabahaha
2016-01-30 01:28:58 -08:00
parent 5d4cd1fc28
commit 7fb39b6dc0
2 changed files with 4 additions and 12 deletions

View File

@@ -57,17 +57,13 @@ var Message = (function (_Equality) {
// this is .add and not .get because it allows the bot to cache
// users from messages from logs who may have left the server and were
// not previously cached.
if (mention instanceof _User2["default"]) _this.mentions.push(mention);else _this.mentions.add(client.internal.users.add(new _User2["default"](mention, client)));
if (mention instanceof _User2["default"]) _this.mentions.add(mention);else _this.mentions.add(client.internal.users.add(new _User2["default"](mention, client)));
});
}
Message.prototype.isMentioned = function isMentioned(user) {
user = this.client.internal.resolver.resolveUser(user);
if (user) {
return this.mentions.has(user);
} else {
return false;
}
return !!(user && this.mentions.has(user));
};
Message.prototype.toString = function toString() {