feat: bug fixes and error safety

This commit is contained in:
TresAbhi committed 2023-05-28 16:56:15 +00:00
1 parent 0b6b2ecedc
commit 780d9d5f8e
25 files changed
+136 -182

No files matched your search

+1 -3
View File
@@ -20,8 +20,6 @@ export default async function getBlitzStarsAccount(
embeds: [notTrackedByBlitzStars],
});
console.log(`Not tracked by BlitzStars.`);
return null;
throw new Error(`${accountId} not tracked by BlitzStars.`);
}
}
@@ -51,7 +51,6 @@ export default async function getTankStatsOverTime(
const latestTankStatsRaw = await getWargamingResponse<TanksStats>(
`https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
);
if (!latestTankStatsRaw) return;
const tankHistoriesResponse = await fetch(
`https://www.blitzstars.com/api/tankhistories/for/${id}/`,
);