From b81f9e8b73cb520ad5ae916c3e571ea55f4ca489 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 20 Aug 2022 23:07:02 -0400 Subject: fix ts composite shit, replace got with native fetch, update deps --- src/commands/utilities/price.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/commands/utilities/price.ts') diff --git a/src/commands/utilities/price.ts b/src/commands/utilities/price.ts index 8a3b5c6..bfe1f10 100644 --- a/src/commands/utilities/price.ts +++ b/src/commands/utilities/price.ts @@ -1,11 +1,9 @@ import { ArgType, BushCommand, clientSendAndPermCheck, colors, emojis, format, oxford, type CommandMessage } from '#lib'; import assert from 'assert/strict'; import { ApplicationCommandOptionType, AutocompleteInteraction, EmbedBuilder, PermissionFlagsBits } from 'discord.js'; -import Fuse from 'fuse.js'; -import got from 'got'; +import { default as Fuse } from 'fuse.js'; assert(Fuse); -assert(got); export default class PriceCommand extends BushCommand { public static cachedItemList: string[] = []; @@ -57,9 +55,8 @@ export default class PriceCommand extends BushCommand { const [bazaar, currentLowestBIN, averageLowestBIN, auctionAverages] = (await Promise.all( PriceCommand.urls.map(({ url, error }) => - got - .get(url) - .json() + fetch(url) + .then((p) => (p.ok ? p.json() : undefined)) .catch(() => (errors.push(error), undefined)) ) )) as [Bazaar?, LowestBIN?, LowestBIN?, AuctionAverages?]; -- cgit