aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities/price.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/utilities/price.ts')
-rw-r--r--src/commands/utilities/price.ts9
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?];