Added semi-functional statuses

This commit is contained in:
hydrabolt
2015-09-26 21:41:23 +01:00
parent 1ef4fa41a7
commit 2f9585a6b9
5 changed files with 105 additions and 66 deletions

View File

@@ -1044,6 +1044,7 @@ class Client {
//def addServer
addServer(data) {
var self = this;
var server = this.getServer("id", data.id);
if (!server) {
@@ -1055,6 +1056,10 @@ class Client {
}
}
}
for(var presence of data.presences){
self.getUser("id", presence.user.id).status = presence.status;
}
return server;
}

View File

@@ -4,6 +4,7 @@ class User{
this.discriminator = data.discriminator;
this.id = data.id;
this.avatar = data.avatar;
this.status = "offline";
}
// access using user.avatarURL;