aboutsummaryrefslogtreecommitdiff
path: root/src/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasks')
-rw-r--r--src/tasks/updatePriceItemCache.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/tasks/updatePriceItemCache.ts b/src/tasks/updatePriceItemCache.ts
index e6d2db4..5f68a8c 100644
--- a/src/tasks/updatePriceItemCache.ts
+++ b/src/tasks/updatePriceItemCache.ts
@@ -11,13 +11,9 @@ export default class UpdatePriceItemCache extends BushTask {
}
public async exec() {
- //prettier-ignore
- const [bazaar, currentLowestBIN, averageLowestBIN, auctionAverages] = (await Promise.all([
- got.get('https://api.hypixel.net/skyblock/bazaar').json().catch(() => {}),
- got.get('https://moulberry.codes/lowestbin.json').json().catch(() => {}),
- got.get('https://moulberry.codes/auction_averages_lbin/3day.json').json().catch(() => {}),
- got.get('https://moulberry.codes/auction_averages/3day.json').json().catch(() => {})
- ])) as [Bazaar, LowestBIN, LowestBIN, AuctionAverages];
+ const [bazaar, currentLowestBIN, averageLowestBIN, auctionAverages] = (await Promise.all(
+ PriceCommand.urls.map(({ url }) => got.get(url).json().catch(undefined))
+ )) as [Bazaar?, LowestBIN?, LowestBIN?, AuctionAverages?];
const itemNames = new Set([
...Object.keys(averageLowestBIN ?? {}),