From 4f32de01e073820e4549618b5727a662a90bc7bf Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 7 Jul 2022 20:09:25 +0200 Subject: minor changes to the price command --- src/tasks/updatePriceItemCache.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/tasks/updatePriceItemCache.ts') 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 ?? {}), -- cgit