mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Made GroupDMChannel.owner a getter and add ownerID
This commit is contained in:
parent
b8e3094b14
commit
3fcc5183dc
1 changed files with 11 additions and 3 deletions
|
|
@ -54,10 +54,10 @@ class GroupDMChannel extends Channel {
|
|||
this.icon = data.icon;
|
||||
|
||||
/**
|
||||
* The owner of this Group DM.
|
||||
* @type {User}
|
||||
* The owner of this Group DM's user ID.
|
||||
* @type {string}
|
||||
*/
|
||||
this.owner = this.client.users.get(data.owner_id);
|
||||
this.ownerID = data.owner_id;
|
||||
|
||||
if (!this.recipients) {
|
||||
/**
|
||||
|
|
@ -77,6 +77,14 @@ class GroupDMChannel extends Channel {
|
|||
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
|
||||
* it is advisable to just compare `channel.id === channel2.id` as it is much faster and is often
|
||||
|
|
|
|||
Loading…
Reference in a new issue