Finished most of structure

This commit is contained in:
hydrabolt
2015-10-31 21:56:13 +00:00
parent c5e5ab54db
commit 5ccaca915b
23 changed files with 323 additions and 70 deletions

View File

@@ -3,9 +3,20 @@
var Channel = require("./Channel.js");
var Equality = require("../Util/Equality.js");
class PMChannel extends Channel{
class PMChannel extends Equality{
constructor(data, client){
super(data, client);
super();
this.client = client;
this.type = data.type || "text";
this.id = data.id;
this.lastMessageId = data.last_message_id;
this.recipient = this.client.internal.users.add(data.recipient);
}
/* warning! may return null */
get lastMessage(){
return this.messages.get("id", this.lastMessageID);
}
}