@@ -23,21 +23,16 @@ async function getLatestProfile(uuid, options = { museum: false, garden: false }
2323 }
2424 }
2525
26- const [ { data : playerRes } , { data : profileRes } ] = await Promise . all ( [
27- axios . get ( `https://api.hypixel.net/v2/player?key=${ config . minecraft . API . hypixelAPIkey } &uuid=${ uuid } ` ) ,
26+ const [ { data : profileRes } ] = await Promise . all ( [
2827 axios . get ( `https://api.hypixel.net/v2/skyblock/profiles?key=${ config . minecraft . API . hypixelAPIkey } &uuid=${ uuid } ` ) ,
2928 ] ) . catch ( ( error ) => {
3029 throw error ?. response ?. data ?. cause ?? "Request to Hypixel API failed. Please try again!" ;
3130 } ) ;
3231
33- if ( playerRes . success === false || profileRes . success === false ) {
32+ if ( profileRes . success === false ) {
3433 throw "Request to Hypixel API failed. Please try again!" ;
3534 }
3635
37- if ( playerRes . player == null ) {
38- throw "Player not found. It looks like this player has never joined the Hypixel." ;
39- }
40-
4136 if ( profileRes . profiles == null || profileRes . profiles . length == 0 ) {
4237 throw "Player has no SkyBlock profiles." ;
4338 }
@@ -57,7 +52,6 @@ async function getLatestProfile(uuid, options = { museum: false, garden: false }
5752 profiles : profileRes . profiles ,
5853 profile : profile ,
5954 profileData : profileData ,
60- playerRes : playerRes . player ,
6155 uuid : uuid ,
6256 ...( options . museum ? await getMuseum ( profileData . profile_id , uuid ) : { } ) ,
6357 ...( options . garden ? await getGarden ( profileData . profile_id ) : { } ) ,
0 commit comments