mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
1.0.1 actual
works!
This commit is contained in:
20
lib/user.js
Normal file
20
lib/user.js
Normal file
@@ -0,0 +1,20 @@
|
||||
exports.User = function(username, id, discriminator, avatar){
|
||||
this.username = username;
|
||||
this.discriminator = discriminator;
|
||||
this.id = id;
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
exports.User.prototype.mention = function(){
|
||||
return "<@"+this.id+">";
|
||||
}
|
||||
|
||||
exports.User.prototype.equals = function(otherUser){
|
||||
|
||||
if(otherUser.id === this.id){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user