mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Added presence updates, typing and ban adds
This commit is contained in:
@@ -13,6 +13,10 @@ class User extends Equality{
|
||||
this.avatar = data.avatar;
|
||||
this.status = data.status || "offline";
|
||||
this.gameID = data.game_id || null;
|
||||
this.typing = {
|
||||
since : null,
|
||||
channel : null
|
||||
};
|
||||
}
|
||||
|
||||
get avatarURL(){
|
||||
@@ -30,6 +34,20 @@ class User extends Equality{
|
||||
toString(){
|
||||
return this.mention();
|
||||
}
|
||||
|
||||
equalsStrict(obj){
|
||||
if(obj instanceof User)
|
||||
return (
|
||||
this.id === obj.id &&
|
||||
this.username === obj.username &&
|
||||
this.discriminator === obj.discriminator &&
|
||||
this.avatar === obj.avatar &&
|
||||
this.status === obj.status &&
|
||||
this.gameID === obj.gameID
|
||||
);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = User;
|
||||
Reference in New Issue
Block a user