This commit is contained in:
Elysia 2023-06-14 20:07:38 +07:00
parent 796428fe11
commit 600f546c11
2 changed files with 5 additions and 12 deletions

View File

@ -87,13 +87,6 @@ class ClientUser extends User {
if ('bio' in data) { if ('bio' in data) {
this.bio = data.bio; this.bio = data.bio;
} }
if ('global_name' in data) {
/**
* Display name of the client user.
* @type {?string}
*/
this.displayName = data.global_name;
}
if (!this.friendNicknames?.size) { if (!this.friendNicknames?.size) {
/** /**
@ -612,12 +605,12 @@ class ClientUser extends User {
} }
/** /**
* Set display name * Set global display name
* @param {string} displayName The new display name * @param {string} globalName The new display name
* @returns {Promise<ClientUser>} * @returns {Promise<ClientUser>}
*/ */
setDisplayName(displayName = '') { setGlobalName(globalName = '') {
return this.edit({ global_name: displayName }); return this.edit({ global_name: globalName });
} }
} }

2
typings/index.d.ts vendored
View File

@ -1089,7 +1089,7 @@ export class ClientUser extends User {
public readonly nsfwAllowed: boolean; public readonly nsfwAllowed: boolean;
public readonly emailAddress: string; public readonly emailAddress: string;
public stopRinging(channel: ChannelResolvable): Promise<void>; public stopRinging(channel: ChannelResolvable): Promise<void>;
public setDisplayName(displayName?: string): Promise<this>; public setGlobalName(globalName?: string): Promise<this>;
} }
type NitroType = 'NONE' | 'NITRO_CLASSIC' | 'NITRO_BOOST' | 'NITRO_BASIC'; type NitroType = 'NONE' | 'NITRO_CLASSIC' | 'NITRO_BOOST' | 'NITRO_BASIC';