update bio

This commit is contained in:
March 7th 2022-04-27 10:48:33 +07:00
parent 6cb13101d8
commit 7c5da85670
3 changed files with 12 additions and 0 deletions

View File

@ -80,6 +80,7 @@ User {
connectedAccounts: [], connectedAccounts: [],
premiumSince: 1623357181151, premiumSince: 1623357181151,
premiumGuildSince: 0, premiumGuildSince: 0,
bio: null,
mutualGuilds: Collection(3) [Map] { mutualGuilds: Collection(3) [Map] {
'906765260017516605' => { id: '906765260017516605', nick: null }, '906765260017516605' => { id: '906765260017516605', nick: null },
'809133733591384155' => { id: '809133733591384155', nick: 'uwu' }, '809133733591384155' => { id: '809133733591384155', nick: 'uwu' },
@ -119,6 +120,7 @@ User {
connectedAccounts: [], connectedAccounts: [],
premiumSince: 1623357181151, premiumSince: 1623357181151,
premiumGuildSince: 0, premiumGuildSince: 0,
bio: null,
mutualGuilds: Collection(3) [Map] { mutualGuilds: Collection(3) [Map] {
'906765260017516605' => { id: '906765260017516605', nick: null }, '906765260017516605' => { id: '906765260017516605', nick: null },
'809133733591384155' => { id: '809133733591384155', nick: 'uwu' }, '809133733591384155' => { id: '809133733591384155', nick: 'uwu' },

View File

@ -34,6 +34,7 @@ class User extends Base {
this.connectedAccounts = []; this.connectedAccounts = [];
this.premiumSince = null; this.premiumSince = null;
this.premiumGuildSince = null; this.premiumGuildSince = null;
this.bio = null;
this.mutualGuilds = new Collection(); this.mutualGuilds = new Collection();
this.applications = null; this.applications = null;
this._patch(data); this._patch(data);
@ -159,6 +160,10 @@ class User extends Base {
this.premiumGuildSince = date.getTime(); 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])); this.mutualGuilds = new Collection(data.mutual_guilds.map(obj => [obj.id, obj]));
} }

5
typings/index.d.ts vendored
View File

@ -2490,6 +2490,11 @@ export class User extends PartialTextBasedChannel(Base) {
public readonly tag: string; public readonly tag: string;
public username: string; public username: string;
public readonly note: string | null; public readonly note: string | null;
public readonly connectedAccounts: Array<Object>;
public readonly premiumSince: Date;
public readonly premiumGuildSince: Date;
public readonly bio: string | null;
public readonly mutualGuilds: Collection<Snowflake, object>;
public avatarURL(options?: ImageURLOptions): string | null; public avatarURL(options?: ImageURLOptions): string | null;
public bannerURL(options?: ImageURLOptions): string | null; public bannerURL(options?: ImageURLOptions): string | null;
public createDM(force?: boolean): Promise<DMChannel>; public createDM(force?: boolean): Promise<DMChannel>;