mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Finished channels
This commit is contained in:
@@ -6,13 +6,11 @@ var Equality = require("../Util/Equality.js");
|
||||
var Cache = require("../Util/Cache.js");
|
||||
var reg = require("../Util/ArgumentRegulariser.js").reg;
|
||||
|
||||
class PMChannel extends Equality{
|
||||
class PMChannel extends Channel{
|
||||
constructor(data, client){
|
||||
super();
|
||||
this.client = client;
|
||||
super(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));
|
||||
|
||||
@@ -8,9 +8,7 @@ class TextChannel extends ServerChannel{
|
||||
constructor(data, client, server){
|
||||
super(data, client, server);
|
||||
|
||||
this.name = data.name;
|
||||
this.topic = data.topic;
|
||||
this.position = data.position;
|
||||
this.lastMessageID = data.last_message_id;
|
||||
this.messages = new Cache("id", client.options.maximumMessages);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user