feat: add a fuck ton of get functions
This commit is contained in:
parent
58fe9a2eac
commit
69feff6cf8
8 changed files with 81 additions and 0 deletions
9
utils/getUuid.ts
Normal file
9
utils/getUuid.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import type { GuildMemberResponse, UserResponse } from "~/types/interfaces";
|
||||
|
||||
export default (profile: UserResponse | GuildMemberResponse): string | null => {
|
||||
if ("username" in profile) {
|
||||
return profile.uuid
|
||||
} else {
|
||||
return profile.user.uuid
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue