Skip to content

Commit

Permalink
🏷️ fix: how did i forgor the name in the user
Browse files Browse the repository at this point in the history
  • Loading branch information
Helloyunho committed Sep 22, 2023
1 parent 343df6d commit 52b75c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions framework/src/structures/users/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export class User {
get discriminator(): string {
return this.payload.discriminator;
}
get name(): string {
return this.payload.global_name ?? this.username;
}
get avatar(): string | null {
return this.payload.avatar;
}
Expand Down
1 change: 1 addition & 0 deletions types/src/users/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface UserPayload {
id: string;
username: string;
discriminator: string;
global_name: string | null;
avatar: string | null;
bot?: boolean;
system?: boolean;
Expand Down

0 comments on commit 52b75c2

Please sign in to comment.