mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Finished most of structure
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user