mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
Made GroupDMChannel.owner a getter and add ownerID
This commit is contained in:
@@ -54,10 +54,10 @@ class GroupDMChannel extends Channel {
|
|||||||
this.icon = data.icon;
|
this.icon = data.icon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The owner of this Group DM.
|
* The owner of this Group DM's user ID.
|
||||||
* @type {User}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
this.owner = this.client.users.get(data.owner_id);
|
this.ownerID = data.owner_id;
|
||||||
|
|
||||||
if (!this.recipients) {
|
if (!this.recipients) {
|
||||||
/**
|
/**
|
||||||
@@ -77,6 +77,14 @@ class GroupDMChannel extends Channel {
|
|||||||
this.lastMessageID = data.last_message_id;
|
this.lastMessageID = data.last_message_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The owner of this Group DM.
|
||||||
|
* @type {User}
|
||||||
|
*/
|
||||||
|
get owner() {
|
||||||
|
return this.client.users.get(this.ownerID);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether this channel equals another channel. It compares all properties, so for most operations
|
* Whether this channel equals another channel. It compares all properties, so for most operations
|
||||||
* it is advisable to just compare `channel.id === channel2.id` as it is much faster and is often
|
* it is advisable to just compare `channel.id === channel2.id` as it is much faster and is often
|
||||||
|
|||||||
Reference in New Issue
Block a user