From 26f48c90e45606d4baeb723193fcfde7eaa2fcd8 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 22 Apr 2023 13:09:46 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Update=20User=20Profile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/structures/User.js | 12 ++++++++++++ typings/index.d.ts | 1 + 2 files changed, 13 insertions(+) diff --git a/src/structures/User.js b/src/structures/User.js index e9fb5a2..e85f0d7 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -294,6 +294,18 @@ class User extends Base { this.application = new ClientApplication(this.client, data.application, this); } + if ('badges' in data) { + /** + * User badges (Boost, Slash, AutoMod, etc.) + * @type {?Array<{ id: string, description: string, icon: string, link?: string }>} + */ + this.badges = data.badges; + } + + if ('guild_badges' in data) { + // Unknown + } + this.mutualGuilds = new Collection(data.mutual_guilds.map(obj => [obj.id, obj])); } diff --git a/typings/index.d.ts b/typings/index.d.ts index 37d9559..4f70e02 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1637,6 +1637,7 @@ export class GuildMember extends PartialTextBasedChannel(Base) { public readonly voice: VoiceState; public themeColors?: [number, number]; public readonly hexThemeColor: [string, string] | null; + public badges: { id: string; description: string; icon: string; link?: string }[] | null; public avatarURL(options?: ImageURLOptions): string | null; public ban(options?: BanOptions): Promise; public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise;