mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 21:12:06 +00:00
fix guild owner
This commit is contained in:
parent
552d603782
commit
8d9a778320
2 changed files with 12 additions and 7 deletions
File diff suppressed because one or more lines are too long
|
|
@ -195,7 +195,7 @@ class Guild {
|
|||
this.large === data.large &&
|
||||
this.icon === data.icon &&
|
||||
arraysEqual(this.features, data.features) &&
|
||||
this.owner.id === data.owner_id &&
|
||||
this.ownerID === data.owner_id &&
|
||||
this.verificationLevel === data.verification_level &&
|
||||
this.embedEnabled === data.embed_enabled;
|
||||
|
||||
|
|
@ -313,11 +313,7 @@ class Guild {
|
|||
}
|
||||
|
||||
if (data.owner_id) {
|
||||
/**
|
||||
* The owner of the guild
|
||||
* @type {GuildMember}
|
||||
*/
|
||||
this.owner = this.members.get(data.owner_id);
|
||||
this.ownerID = data.owner_id;
|
||||
}
|
||||
|
||||
if (data.channels) {
|
||||
|
|
@ -616,6 +612,15 @@ class Guild {
|
|||
}
|
||||
return Constants.Endpoints.guildIcon(this.id, this.icon);
|
||||
}
|
||||
|
||||
/**
|
||||
* The owner of the Guild
|
||||
* @type {Member}
|
||||
* @readonly
|
||||
*/
|
||||
get owner() {
|
||||
return this.members.get(this.ownerID);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Guild;
|
||||
|
|
|
|||
Loading…
Reference in a new issue