mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Fixed start PM
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
var Channel = require("./Channel.js");
|
||||
var User = require("./User.js");
|
||||
var Equality = require("../Util/Equality.js");
|
||||
var Cache = require("../Util/Cache.js");
|
||||
|
||||
class PMChannel extends Equality{
|
||||
constructor(data, client){
|
||||
@@ -11,7 +13,8 @@ class PMChannel extends Equality{
|
||||
this.type = data.type || "text";
|
||||
this.id = data.id;
|
||||
this.lastMessageId = data.last_message_id;
|
||||
this.recipient = this.client.internal.users.add(data.recipient);
|
||||
this.messages = new Cache("id", 1000);
|
||||
this.recipient = this.client.internal.users.add(new User(data.recipient, this.client));
|
||||
}
|
||||
|
||||
/* warning! may return null */
|
||||
|
||||
Reference in New Issue
Block a user