Finished channels

This commit is contained in:
hydrabolt
2015-11-20 20:44:09 +00:00
parent d26702f48f
commit 19fb8e6dfd
10 changed files with 127 additions and 14 deletions

View File

@@ -12,17 +12,15 @@ var Equality = require("../Util/Equality.js");
var Cache = require("../Util/Cache.js");
var reg = require("../Util/ArgumentRegulariser.js").reg;
var PMChannel = (function (_Equality) {
_inherits(PMChannel, _Equality);
var PMChannel = (function (_Channel) {
_inherits(PMChannel, _Channel);
function PMChannel(data, client) {
_classCallCheck(this, PMChannel);
_Equality.call(this);
this.client = client;
_Channel.call(this, data, client);
this.type = data.type || "text";
this.id = data.id;
this.lastMessageId = data.last_message_id;
this.messages = new Cache("id", 1000);
this.recipient = this.client.internal.users.add(new User(data.recipient, this.client));
@@ -50,6 +48,6 @@ var PMChannel = (function (_Equality) {
}]);
return PMChannel;
})(Equality);
})(Channel);
module.exports = PMChannel;