diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-07-07 20:09:25 +0200 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-07-07 20:09:25 +0200 |
commit | 4f32de01e073820e4549618b5727a662a90bc7bf (patch) | |
tree | f8ff3faa4d88d3f48f6d6325dfe37098ff694d04 /src/tasks/updatePriceItemCache.ts | |
parent | 8d5e4753adeccab790f48dae173783f52f1b9daa (diff) | |
download | tanzanite-4f32de01e073820e4549618b5727a662a90bc7bf.tar.gz tanzanite-4f32de01e073820e4549618b5727a662a90bc7bf.tar.bz2 tanzanite-4f32de01e073820e4549618b5727a662a90bc7bf.zip |
minor changes to the price command
Diffstat (limited to 'src/tasks/updatePriceItemCache.ts')
-rw-r--r-- | src/tasks/updatePriceItemCache.ts | 10 |
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 ?? {}), |