mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
fix(Partials): correctly document properties for partialized st… (#3922)
* fix(Partials): properly document partial properties * style: turn tabs into spaces * style: order properties alphabetically * fix(typings): PartialDMChannel will always have a recipient * change properties to undefined instead of null * docs: correctly mark properties * style: remove tabs * fix(partials): document properties properly * style: tabs * style: random line * docs(User): tag is nullable * typings(User/GuildMember): document lastMessageID properly * typings/fix: change lastMessageID to lastMessageChannelID Co-authored-by: Crawl <icrawltogo@gmail.com>
This commit is contained in:
@@ -38,14 +38,14 @@ class User extends Base {
|
||||
_patch(data) {
|
||||
/**
|
||||
* The username of the user
|
||||
* @type {string}
|
||||
* @type {?string}
|
||||
* @name User#username
|
||||
*/
|
||||
if (data.username) this.username = data.username;
|
||||
|
||||
/**
|
||||
* A discriminator based on username for the user
|
||||
* @type {string}
|
||||
* @type {?string}
|
||||
* @name User#discriminator
|
||||
*/
|
||||
if (data.discriminator) this.discriminator = data.discriminator;
|
||||
@@ -166,11 +166,11 @@ class User extends Base {
|
||||
|
||||
/**
|
||||
* The Discord "tag" (e.g. `hydrabolt#0001`) for this user
|
||||
* @type {string}
|
||||
* @type {?string}
|
||||
* @readonly
|
||||
*/
|
||||
get tag() {
|
||||
return `${this.username}#${this.discriminator}`;
|
||||
return typeof this.username === 'string' ? `${this.username}#${this.discriminator}` : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user