added private messages, better cache tracking and channel/server creation/deletion and signals

This commit is contained in:
hydrabolt
2015-08-13 21:43:55 +01:00
parent 70c20c63ea
commit 68d93a0d7a
4 changed files with 174 additions and 8 deletions

6
lib/PMChannel.js Normal file
View File

@@ -0,0 +1,6 @@
var User = require("./user.js").User;
exports.PMChannel = function(user, id){
this.user = new User(user);
this.id = id;
}

View File

@@ -3,6 +3,8 @@ var apibase = base + "api";
exports.WEBSOCKET_HUB = "wss://discordapp.com/hub"
exports.USERS = apibase + "/users";
exports.LOGIN = apibase + "/auth/login";
exports.LOGOUT = apibase + "/auth/logout";

View File

@@ -20,10 +20,6 @@ exports.User.prototype.mention = function(){
exports.User.prototype.equals = function(otherUser){
if(otherUser.id === this.id){
return true;
} else {
return false;
}
return otherUser.id === this.id;
}