diff options
Diffstat (limited to 'src/hypixel.ts')
-rw-r--r-- | src/hypixel.ts | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/hypixel.ts b/src/hypixel.ts index 0d3e9ea..5a13845 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -116,33 +116,3 @@ export async function fetchUser({ user, uuid, username }: UserAny, included: Inc } } -/** - * Fetch a CleanMemberProfile from a user and string - * This is safe to use many times as the results are cached! - * @param user A username or uuid - * @param profile A profile name or profile uuid - */ -export async function fetchMemberProfile(user: string, profile: string): Promise<CleanMemberProfile> { - const playerUuid = await cached.uuidFromUser(user) - const profileUuid = await cached.fetchProfileUuid(user, profile) - - const player = await cached.fetchPlayer(playerUuid) - - const cleanProfile = await cached.fetchProfile(playerUuid, profileUuid) - - const member = cleanProfile.members.find(m => m.uuid === playerUuid) - - return { - member: { - profileName: cleanProfile.name, - first_join: member.first_join, - last_save: member.last_save, - - // add all other data relating to the hypixel player, such as username, rank, etc - ...player - }, - profile: { - minions: cleanProfile.minions - } - } -} |