From d1f434f53c73c4b7f6327b168f38441732a4a843 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 2 Jul 2022 15:13:05 -0500 Subject: auction item lore i sure hope this doesn't go terribly wrong and use up a bunch of space --- src/database.ts | 4 ++++ src/hypixel.ts | 1 + 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/database.ts b/src/database.ts index e7a7bad..d0c5da0 100644 --- a/src/database.ts +++ b/src/database.ts @@ -130,6 +130,8 @@ export interface SimpleAuctionSchemaBson { s: boolean /** If this is missing, it's false. */ bin?: true + /** The lore of the item. Lines are separated by newline characters. */ + lore: string } export interface SimpleAuctionSchema { /** The UUID of the auction so we can look it up later. */ @@ -143,6 +145,8 @@ export interface SimpleAuctionSchema { /** Whether the auction was successfully bought or simply expired. */ s: boolean bin: boolean + /** The lore of the item. */ + lore: string } export interface ItemAuctionsSchema { /** The id of the item */ diff --git a/src/hypixel.ts b/src/hypixel.ts index 7689b55..70753f7 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -404,6 +404,7 @@ export async function periodicallyFetchRecentlyEndedAuctions() { id: auction.id, ts: Math.floor(auction.timestamp / 1000), bin: auction.bin, + lore: auction.item.display.lore.join('\n') } // make sure the auction isn't already in there if (!auctions.find((a) => a.id === simpleAuction.id)) { -- cgit