Add iconURL/avatarURL and fix object.values reference

This commit is contained in:
Amish Shah
2016-08-26 19:00:50 +01:00
parent 0988b47fcd
commit e5057a5b6a
4 changed files with 26 additions and 6 deletions

View File

@@ -522,6 +522,18 @@ class Guild {
setSplash(splash) {
return this.edit({ splash });
}
/**
* Gets the URL to this guild's icon (if it has one, otherwise it returns null)
* @type {?String}
* @readonly
*/
get iconURL() {
if (!this.icon) {
return null;
}
return Constants.Endpoints.guildIcon(this.id, this.icon);
}
}
module.exports = Guild;