Quality of life changes (#968)

* + Added function to get a user's default avatar
+ Added HOST constant to Constants
+ Added assets endpoint
+ Added quality of life function to get a user's avatar or default avatar
+ Added quality of life function to get member's nickname or username

* * Fixed invocation of a getter.

* Fixed lint issue

* Made the API constant use the HOST constant for DRY-ness
Changed DOC comment to be more descriptive

* Update GuildMember.js
This commit is contained in:
Cole
2016-12-12 21:34:19 -06:00
committed by Schuyler Cebulskie
parent 3193df792e
commit 586d652c16
3 changed files with 40 additions and 1 deletions

View File

@@ -182,6 +182,15 @@ class GuildMember {
return this.user.id;
}
/**
* The nickname of the member, or their username if they don't have one
* @type {string}
* @readonly
*/
get displayName() {
return this.nickname || this.user.username;
}
/**
* The overall set of permissions for the guild member, taking only roles into account
* @type {EvaluatedPermissions}