From 600f546c118cfa9bd66fa3b8a9330d4c26f3f137 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Wed, 14 Jun 2023 20:07:38 +0700 Subject: [PATCH] fix: #704 --- src/structures/ClientUser.js | 15 ++++----------- typings/index.d.ts | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 620f76d..4033817 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -87,13 +87,6 @@ class ClientUser extends User { if ('bio' in data) { 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) { /** @@ -612,12 +605,12 @@ class ClientUser extends User { } /** - * Set display name - * @param {string} displayName The new display name + * Set global display name + * @param {string} globalName The new display name * @returns {Promise} */ - setDisplayName(displayName = '') { - return this.edit({ global_name: displayName }); + setGlobalName(globalName = '') { + return this.edit({ global_name: globalName }); } } diff --git a/typings/index.d.ts b/typings/index.d.ts index f8cd148..dc22649 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1089,7 +1089,7 @@ export class ClientUser extends User { public readonly nsfwAllowed: boolean; public readonly emailAddress: string; public stopRinging(channel: ChannelResolvable): Promise; - public setDisplayName(displayName?: string): Promise; + public setGlobalName(globalName?: string): Promise; } type NitroType = 'NONE' | 'NITRO_CLASSIC' | 'NITRO_BOOST' | 'NITRO_BASIC';