mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
Clean up a bunch of stuff
- Channel typing data is now a Map - Client properties on structures are now non-enumerable and non-configurable
This commit is contained in:
@@ -16,18 +16,15 @@ class DMChannel extends Channel {
|
||||
|
||||
setup(data) {
|
||||
super.setup(data);
|
||||
const recipient = this.client.users.get(data.recipients[0].id) || new User(this.client, data.recipients[0]);
|
||||
|
||||
/**
|
||||
* The recipient on the other end of the DM
|
||||
* @type {User}
|
||||
*/
|
||||
this.recipient = recipient;
|
||||
/**
|
||||
* The ID of the last sent message, if available
|
||||
* @type {?string}
|
||||
*/
|
||||
this.lastMessageID = data.last_message_id;
|
||||
this.recipient = this.client.users.get(data.recipients[0].id) || new User(this.client, data.recipients[0]);
|
||||
|
||||
this.type = 'dm';
|
||||
this.lastMessageID = data.last_message_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user