From 7c5da8567025493e8f8cd8ebf83d553e38083b55 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Wed, 27 Apr 2022 10:48:33 +0700 Subject: [PATCH] update bio --- Document/User.md | 2 ++ src/structures/User.js | 5 +++++ typings/index.d.ts | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/Document/User.md b/Document/User.md index fb18e86..7fec8a7 100644 --- a/Document/User.md +++ b/Document/User.md @@ -80,6 +80,7 @@ User { connectedAccounts: [], premiumSince: 1623357181151, premiumGuildSince: 0, + bio: null, mutualGuilds: Collection(3) [Map] { '906765260017516605' => { id: '906765260017516605', nick: null }, '809133733591384155' => { id: '809133733591384155', nick: 'uwu' }, @@ -119,6 +120,7 @@ User { connectedAccounts: [], premiumSince: 1623357181151, premiumGuildSince: 0, + bio: null, mutualGuilds: Collection(3) [Map] { '906765260017516605' => { id: '906765260017516605', nick: null }, '809133733591384155' => { id: '809133733591384155', nick: 'uwu' }, diff --git a/src/structures/User.js b/src/structures/User.js index 298fc4a..447150a 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -34,6 +34,7 @@ class User extends Base { this.connectedAccounts = []; this.premiumSince = null; this.premiumGuildSince = null; + this.bio = null; this.mutualGuilds = new Collection(); this.applications = null; this._patch(data); @@ -159,6 +160,10 @@ class User extends Base { this.premiumGuildSince = date.getTime(); } + if ('bio' in data.user) { + this.bio = data.user.bio; + } + 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 04b6118..ea0c099 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2490,6 +2490,11 @@ export class User extends PartialTextBasedChannel(Base) { public readonly tag: string; public username: string; public readonly note: string | null; + public readonly connectedAccounts: Array; + public readonly premiumSince: Date; + public readonly premiumGuildSince: Date; + public readonly bio: string | null; + public readonly mutualGuilds: Collection; public avatarURL(options?: ImageURLOptions): string | null; public bannerURL(options?: ImageURLOptions): string | null; public createDM(force?: boolean): Promise;