aboutsummaryrefslogtreecommitdiff
path: root/build/cleaners/player.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/cleaners/player.js')
-rw-r--r--build/cleaners/player.js23
1 files changed, 9 insertions, 14 deletions
diff --git a/build/cleaners/player.js b/build/cleaners/player.js
index 42c76b8..214be1f 100644
--- a/build/cleaners/player.js
+++ b/build/cleaners/player.js
@@ -1,22 +1,17 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.cleanPlayerResponse = void 0;
-const profiles_1 = require("./skyblock/profiles");
-const socialmedia_1 = require("./socialmedia");
-const rank_1 = require("./rank");
-const util_1 = require("../util");
-async function cleanPlayerResponse(data) {
- var _a, _b;
+import { cleanPlayerSkyblockProfiles } from './skyblock/profiles.js';
+import { cleanSocialMedia } from './socialmedia.js';
+import { cleanRank } from './rank.js';
+import { undashUuid } from '../util.js';
+export async function cleanPlayerResponse(data) {
// Cleans up a 'player' api response
if (!data)
return null; // bruh
return {
- uuid: util_1.undashUuid(data.uuid),
+ uuid: undashUuid(data.uuid),
username: data.displayname,
- rank: rank_1.cleanRank(data),
- socials: socialmedia_1.cleanSocialMedia(data),
+ rank: cleanRank(data),
+ socials: cleanSocialMedia(data),
// first_join: data.firstLogin / 1000,
- profiles: profiles_1.cleanPlayerSkyblockProfiles((_b = (_a = data.stats) === null || _a === void 0 ? void 0 : _a.SkyBlock) === null || _b === void 0 ? void 0 : _b.profiles)
+ profiles: cleanPlayerSkyblockProfiles(data.stats?.SkyBlock?.profiles)
};
}
-exports.cleanPlayerResponse = cleanPlayerResponse;