mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Fixed start PM
This commit is contained in:
@@ -7,7 +7,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
var Channel = require("./Channel.js");
|
||||
var User = require("./User.js");
|
||||
var Equality = require("../Util/Equality.js");
|
||||
var Cache = require("../Util/Cache.js");
|
||||
|
||||
var PMChannel = (function (_Equality) {
|
||||
_inherits(PMChannel, _Equality);
|
||||
@@ -21,7 +23,8 @@ var PMChannel = (function (_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