feat: Update User Profile

This commit is contained in:
Elysia 2023-04-22 13:09:46 +07:00
parent a7a9add421
commit 26f48c90e4
2 changed files with 13 additions and 0 deletions

View File

@ -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]));
}

1
typings/index.d.ts vendored
View File

@ -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<GuildMember>;
public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise<GuildMember>;