aboutsummaryrefslogtreecommitdiff
path: root/src/hypixelCached.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/hypixelCached.ts')
-rw-r--r--src/hypixelCached.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts
index e311fe6..1b8b617 100644
--- a/src/hypixelCached.ts
+++ b/src/hypixelCached.ts
@@ -8,11 +8,9 @@ import * as hypixel from './hypixel'
import { CleanPlayer } from './cleaners/player'
import { undashUuid } from './util'
import { CleanProfile, CleanFullProfile, CleanBasicProfile } from './cleaners/skyblock/profile'
+import { debug } from '.'
-// TODO: put this somewhere else
-const debug = false
-
// cache usernames for 4 hours
const usernameCache = new NodeCache({
@@ -185,7 +183,10 @@ async function fetchBasicProfiles(user: string): Promise<CleanBasicProfile[]> {
*/
export async function fetchProfileUuid(user: string, profile: string) {
// if a profile wasn't provided, return
- if (!profile) return null
+ if (!profile) {
+ if (debug) console.log('no profile provided?', user, profile)
+ return null
+ }
const profiles = await fetchBasicProfiles(user)