diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-20 23:07:02 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-20 23:07:02 -0400 |
commit | b81f9e8b73cb520ad5ae916c3e571ea55f4ca489 (patch) | |
tree | 25d7f42d66c3e3190022ece043c86082a9e85709 /src/commands/utilities/price.ts | |
parent | f2e5cfff7dc275bd93fac446a508b7d18ecd6c58 (diff) | |
download | tanzanite-b81f9e8b73cb520ad5ae916c3e571ea55f4ca489.tar.gz tanzanite-b81f9e8b73cb520ad5ae916c3e571ea55f4ca489.tar.bz2 tanzanite-b81f9e8b73cb520ad5ae916c3e571ea55f4ca489.zip |
fix ts composite shit, replace got with native fetch, update deps
Diffstat (limited to 'src/commands/utilities/price.ts')
-rw-r--r-- | src/commands/utilities/price.ts | 9 |
1 files changed, 3 insertions, 6 deletions
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?]; |