diff options
author | mat <github@matdoes.dev> | 2021-06-02 19:50:36 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-06-02 19:50:36 -0500 |
commit | d202ebeaa39f4422da975cf678d571dc8071b439 (patch) | |
tree | a1d7deae1747caf928ff9da7dba57add0be71c2d | |
parent | 3280a963dfd39067fdbece2bb49575744e957df8 (diff) | |
download | skyblock-api-d202ebeaa39f4422da975cf678d571dc8071b439.tar.gz skyblock-api-d202ebeaa39f4422da975cf678d571dc8071b439.tar.bz2 skyblock-api-d202ebeaa39f4422da975cf678d571dc8071b439.zip |
oh turns out people are just putting invalid usernames
-rw-r--r-- | build/mojang.js | 3 | ||||
-rw-r--r-- | src/mojang.ts | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/build/mojang.js b/build/mojang.js index 6ff52b7..dac5789 100644 --- a/build/mojang.js +++ b/build/mojang.js @@ -63,7 +63,8 @@ async function profileFromUsername(username) { console.log('mojang returned', rawData); if (!(data === null || data === void 0 ? void 0 : data.id)) { console.log('mojang api failed, trying ashcon as backup'); - return await profileFromUsernameAlternative(username); + return { uuid: null, username: null }; + // return await profileFromUsernameAlternative(username) } return { uuid: data.id, diff --git a/src/mojang.ts b/src/mojang.ts index 580a2ab..2e88dbd 100644 --- a/src/mojang.ts +++ b/src/mojang.ts @@ -77,7 +77,8 @@ export async function profileFromUsername(username: string): Promise<MojangApiRe if (!data?.id) { console.log('mojang api failed, trying ashcon as backup') - return await profileFromUsernameAlternative(username) + return { uuid: null, username: null } + // return await profileFromUsernameAlternative(username) } return { uuid: data.id, |