diff options
-rw-r--r-- | build/hypixel.js | 2 | ||||
-rw-r--r-- | build/hypixelCached.js | 6 | ||||
-rw-r--r-- | src/hypixel.ts | 2 | ||||
-rw-r--r-- | src/hypixelCached.ts | 9 |
4 files changed, 16 insertions, 3 deletions
diff --git a/build/hypixel.js b/build/hypixel.js index d77e1ae..ea61e4e 100644 --- a/build/hypixel.js +++ b/build/hypixel.js @@ -83,7 +83,7 @@ async function fetchUser({ user, uuid, username }, included = ['player']) { if (!includeProfiles) basicProfilesData = playerData === null || playerData === void 0 ? void 0 : playerData.profiles; if (playerData) - playerData.profiles = undefined; + delete playerData.profiles; } if (includeProfiles) { profilesData = await cached.fetchSkyblockProfiles(uuid); diff --git a/build/hypixelCached.js b/build/hypixelCached.js index c5a027c..50ffc3d 100644 --- a/build/hypixelCached.js +++ b/build/hypixelCached.js @@ -340,3 +340,9 @@ async function fetchProfileName(user, profile) { return profileName; } exports.fetchProfileName = fetchProfileName; +setInterval(() => { + const keys = exports.basicPlayerCache.keys(); + if (keys) + console.log(exports.basicPlayerCache.get(keys[keys.length - 1])); + console.log(exports.basicPlayerCache.getStats()); +}, 60 * 1000); diff --git a/src/hypixel.ts b/src/hypixel.ts index 464f3dd..4d3e692 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -100,7 +100,7 @@ export async function fetchUser({ user, uuid, username }: UserAny, included: Inc if (!includeProfiles) basicProfilesData = playerData?.profiles if (playerData) - playerData.profiles = undefined + delete playerData.profiles } if (includeProfiles) { profilesData = await cached.fetchSkyblockProfiles(uuid) diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts index f7b96ef..3896703 100644 --- a/src/hypixelCached.ts +++ b/src/hypixelCached.ts @@ -365,4 +365,11 @@ export async function fetchProfileName(user: string, profile: string): Promise<s profileNameCache.set(`${playerUuid}.${profileUuid}`, profileName) return profileName -}
\ No newline at end of file +} + +setInterval(() => { + const keys = basicPlayerCache.keys() + if (keys) + console.log(basicPlayerCache.get(keys[keys.length - 1])) + console.log(basicPlayerCache.getStats()) +}, 60 * 1000)
\ No newline at end of file |