aboutsummaryrefslogtreecommitdiff
path: root/build/hypixel.js
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-02-13 15:57:09 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-02-13 15:57:09 -0600
commit604cf4233e3d69d7769d330c4f31876950a0e83d (patch)
treeb28ae09a5e7a3d280d8a939d2f4bdcbe62d80c3d /build/hypixel.js
parent07496ac87ce982200474cc0af4afdf9665e6480c (diff)
downloadskyblock-api-604cf4233e3d69d7769d330c4f31876950a0e83d.tar.gz
skyblock-api-604cf4233e3d69d7769d330c4f31876950a0e83d.tar.bz2
skyblock-api-604cf4233e3d69d7769d330c4f31876950a0e83d.zip
tsc
Diffstat (limited to 'build/hypixel.js')
-rw-r--r--build/hypixel.js28
1 files changed, 1 insertions, 27 deletions
diff --git a/build/hypixel.js b/build/hypixel.js
index 61a8518..f651a66 100644
--- a/build/hypixel.js
+++ b/build/hypixel.js
@@ -22,7 +22,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
-exports.fetchMemberProfile = exports.fetchUser = exports.sendCleanApiRequest = exports.maxMinion = exports.saveInterval = void 0;
+exports.fetchUser = exports.sendCleanApiRequest = exports.maxMinion = exports.saveInterval = void 0;
const player_1 = require("./cleaners/player");
const hypixelApi_1 = require("./hypixelApi");
const cached = __importStar(require("./hypixelCached"));
@@ -108,29 +108,3 @@ async function fetchUser({ user, uuid, username }, included = ['player']) {
};
}
exports.fetchUser = fetchUser;
-/**
- * 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
- */
-async function fetchMemberProfile(user, profile) {
- 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
- }
- };
-}
-exports.fetchMemberProfile = fetchMemberProfile;