mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
fix guild owner
This commit is contained in:
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;
|
||||
|
||||
Reference in New Issue
Block a user