aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/cleaners/skyblock/profiles.js1
-rw-r--r--build/hypixel.js1
-rw-r--r--build/hypixelApi.js2
-rw-r--r--build/hypixelCached.js5
-rw-r--r--build/mojang.js1
-rw-r--r--src/cleaners/skyblock/profiles.ts1
-rw-r--r--src/hypixel.ts1
-rw-r--r--src/hypixelApi.ts2
-rw-r--r--src/hypixelCached.ts5
-rw-r--r--src/mojang.ts1
10 files changed, 0 insertions, 20 deletions
diff --git a/build/cleaners/skyblock/profiles.js b/build/cleaners/skyblock/profiles.js
index 1996d55..b4eb07b 100644
--- a/build/cleaners/skyblock/profiles.js
+++ b/build/cleaners/skyblock/profiles.js
@@ -10,7 +10,6 @@ function cleanPlayerSkyblockProfiles(rawProfiles) {
name: profile.cute_name
});
}
- console.log('cleanPlayerSkyblockProfiles', profiles);
return profiles;
}
exports.cleanPlayerSkyblockProfiles = cleanPlayerSkyblockProfiles;
diff --git a/build/hypixel.js b/build/hypixel.js
index 91ec025..ee81fb5 100644
--- a/build/hypixel.js
+++ b/build/hypixel.js
@@ -37,7 +37,6 @@ async function sendCleanApiRequest({ path, args }, included, options) {
const rawResponse = await hypixelApi_1.sendApiRequest({ path, key, args });
if (rawResponse.throttled) {
// if it's throttled, wait a second and try again
- console.log('throttled :/');
await new Promise(resolve => setTimeout(resolve, 1000));
return await sendCleanApiRequest({ path, args }, included, options);
}
diff --git a/build/hypixelApi.js b/build/hypixelApi.js
index c9621eb..ca2526f 100644
--- a/build/hypixelApi.js
+++ b/build/hypixelApi.js
@@ -45,7 +45,6 @@ function chooseApiKey() {
exports.chooseApiKey = chooseApiKey;
/** Send an HTTP request to the Hypixel API */
async function sendApiRequest({ path, key, args }) {
- console.log('sending api request to', path, args);
// Send a raw http request to api.hypixel.net, and return the parsed json
if (key)
// If there's an api key, add it to the arguments
@@ -64,7 +63,6 @@ async function sendApiRequest({ path, key, args }) {
if (fetchJsonParsed.throttle) {
if (apiKeyUsage[key])
apiKeyUsage[key].remaining = 0;
- console.log('throttled :(');
return { throttled: true };
}
return fetchJsonParsed;
diff --git a/build/hypixelCached.js b/build/hypixelCached.js
index c357763..660bab4 100644
--- a/build/hypixelCached.js
+++ b/build/hypixelCached.js
@@ -100,7 +100,6 @@ exports.usernameFromUser = usernameFromUser;
async function fetchPlayer(user) {
const playerUuid = await uuidFromUser(user);
if (playerCache.has(playerUuid)) {
- console.log('cache hit! fetchPlayer', playerUuid);
return playerCache.get(playerUuid);
}
const cleanPlayer = await hypixel.sendCleanApiRequest({
@@ -115,7 +114,6 @@ async function fetchPlayer(user) {
exports.fetchPlayer = fetchPlayer;
async function fetchSkyblockProfiles(playerUuid) {
if (profilesCache.has(playerUuid)) {
- console.log('cache hit! fetchSkyblockProfiles', playerUuid);
return profilesCache.get(playerUuid);
}
const profiles = await hypixel.sendCleanApiRequest({
@@ -154,7 +152,6 @@ exports.fetchSkyblockProfiles = fetchSkyblockProfiles;
async function fetchBasicProfiles(user) {
const playerUuid = await uuidFromUser(user);
if (basicProfilesCache.has(playerUuid)) {
- console.log('cache hit! fetchBasicProfiles');
return basicProfilesCache.get(playerUuid);
}
const player = await fetchPlayer(playerUuid);
@@ -193,7 +190,6 @@ async function fetchProfile(user, profile) {
const playerUuid = await uuidFromUser(user);
const profileUuid = await fetchProfileUuid(playerUuid, profile);
if (profileCache.has(profileUuid)) {
- console.log('cache hit! fetchProfile');
// we have the profile cached, return it :)
return profileCache.get(profileUuid);
}
@@ -219,7 +215,6 @@ async function fetchProfileName(user, profile) {
const playerUuid = await uuidFromUser(user);
if (profileNameCache.has(`${playerUuid}.${profileUuid}`)) {
// Return the profile name if it's cached
- console.log('cache hit! fetchProfileName');
return profileNameCache.get(`${playerUuid}.${profileUuid}`);
}
const basicProfiles = await fetchBasicProfiles(playerUuid);
diff --git a/build/mojang.js b/build/mojang.js
index 344e377..afca782 100644
--- a/build/mojang.js
+++ b/build/mojang.js
@@ -17,7 +17,6 @@ const httpsAgent = new https_1.Agent({
* Get mojang api data from ashcon.app
*/
async function mojangDataFromUser(user) {
- console.log('cache miss :( mojangDataFromUser', user);
const fetchResponse = await node_fetch_1.default('https://api.ashcon.app/mojang/v2/user/' + user, { agent: () => httpsAgent });
return await fetchResponse.json();
}
diff --git a/src/cleaners/skyblock/profiles.ts b/src/cleaners/skyblock/profiles.ts
index 0138c0b..ea290f6 100644
--- a/src/cleaners/skyblock/profiles.ts
+++ b/src/cleaners/skyblock/profiles.ts
@@ -9,7 +9,6 @@ export function cleanPlayerSkyblockProfiles(rawProfiles: HypixelPlayerStatsSkyBl
name: profile.cute_name
})
}
- console.log('cleanPlayerSkyblockProfiles', profiles)
return profiles
}
diff --git a/src/hypixel.ts b/src/hypixel.ts
index f3e1491..e2d0e6b 100644
--- a/src/hypixel.ts
+++ b/src/hypixel.ts
@@ -30,7 +30,6 @@ export async function sendCleanApiRequest({ path, args }, included?: Included[],
const rawResponse = await sendApiRequest({ path, key, args })
if (rawResponse.throttled) {
// if it's throttled, wait a second and try again
- console.log('throttled :/')
await new Promise(resolve => setTimeout(resolve, 1000))
return await sendCleanApiRequest({ path, args }, included, options)
}
diff --git a/src/hypixelApi.ts b/src/hypixelApi.ts
index 5b5e20f..5c4bb2b 100644
--- a/src/hypixelApi.ts
+++ b/src/hypixelApi.ts
@@ -127,7 +127,6 @@ export interface HypixelPlayer {
/** Send an HTTP request to the Hypixel API */
export async function sendApiRequest({ path, key, args }): Promise<HypixelResponse> {
- console.log('sending api request to', path, args)
// Send a raw http request to api.hypixel.net, and return the parsed json
if (key)
@@ -154,7 +153,6 @@ export async function sendApiRequest({ path, key, args }): Promise<HypixelRespon
if (fetchJsonParsed.throttle) {
if (apiKeyUsage[key])
apiKeyUsage[key].remaining = 0
- console.log('throttled :(')
return { throttled: true }
}
return fetchJsonParsed
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts
index 1125aa8..056f50e 100644
--- a/src/hypixelCached.ts
+++ b/src/hypixelCached.ts
@@ -92,7 +92,6 @@ export async function fetchPlayer(user: string): Promise<CleanPlayer> {
const playerUuid = await uuidFromUser(user)
if (playerCache.has(playerUuid)) {
- console.log('cache hit! fetchPlayer', playerUuid)
return playerCache.get(playerUuid)
}
@@ -111,7 +110,6 @@ export async function fetchPlayer(user: string): Promise<CleanPlayer> {
export async function fetchSkyblockProfiles(playerUuid: string): Promise<CleanProfile[]> {
if (profilesCache.has(playerUuid)) {
- console.log('cache hit! fetchSkyblockProfiles', playerUuid)
return profilesCache.get(playerUuid)
}
@@ -157,7 +155,6 @@ export async function fetchSkyblockProfiles(playerUuid: string): Promise<CleanPr
async function fetchBasicProfiles(user: string): Promise<CleanBasicProfile[]> {
const playerUuid = await uuidFromUser(user)
if (basicProfilesCache.has(playerUuid)) {
- console.log('cache hit! fetchBasicProfiles')
return basicProfilesCache.get(playerUuid)
}
const player = await fetchPlayer(playerUuid)
@@ -202,7 +199,6 @@ export async function fetchProfile(user: string, profile: string): Promise<Clean
const profileUuid = await fetchProfileUuid(playerUuid, profile)
if (profileCache.has(profileUuid)) {
- console.log('cache hit! fetchProfile')
// we have the profile cached, return it :)
return profileCache.get(profileUuid)
}
@@ -238,7 +234,6 @@ export async function fetchProfileName(user: string, profile: string): Promise<s
if (profileNameCache.has(`${playerUuid}.${profileUuid}`)) {
// Return the profile name if it's cached
- console.log('cache hit! fetchProfileName')
return profileNameCache.get(`${playerUuid}.${profileUuid}`)
}
diff --git a/src/mojang.ts b/src/mojang.ts
index 4de7717..3ec274e 100644
--- a/src/mojang.ts
+++ b/src/mojang.ts
@@ -34,7 +34,6 @@ interface AshconResponse {
* Get mojang api data from ashcon.app
*/
export async function mojangDataFromUser(user: string): Promise<AshconResponse> {
- console.log('cache miss :( mojangDataFromUser', user)
const fetchResponse = await fetch(
'https://api.ashcon.app/mojang/v2/user/' + user,
{ agent: () => httpsAgent }