From b36aa3475b1918bcbf2b7cfcad661cfb739878c9 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 2 Jul 2022 00:02:54 -0500 Subject: Improve /auction/:uuid --- src/hypixel.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/hypixel.ts b/src/hypixel.ts index 3569466..7689b55 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -331,10 +331,12 @@ export async function fetchItemList() { } export async function fetchAuctionUncached(uuid: string) { - return await sendCleanApiRequest( + const auctions = await sendCleanApiRequest( 'skyblock/auction', { uuid } ) + if (!auctions || auctions.auctions.length === 0) return null + return auctions.auctions[0] } /** -- cgit