Added msg.isMentioned

This commit is contained in:
hydrabolt
2015-11-18 17:24:15 +00:00
parent c342ca4116
commit 6bca494ddc
4 changed files with 26 additions and 0 deletions

View File

@@ -37,6 +37,15 @@ class Message{
this.mentions.add(client.internal.users.add(new User(mention, client)));
});
}
isMentioned(user){
user = this.client.internal.resolver.resolveUser(user);
if (user) {
return this.mentions.has(user);
} else {
return false;
}
}
toString(){
return this.content;