aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-02 19:50:36 -0500
committermat <github@matdoes.dev>2021-06-02 19:50:36 -0500
commitd202ebeaa39f4422da975cf678d571dc8071b439 (patch)
treea1d7deae1747caf928ff9da7dba57add0be71c2d
parent3280a963dfd39067fdbece2bb49575744e957df8 (diff)
downloadskyblock-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.js3
-rw-r--r--src/mojang.ts3
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,