mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user