diff options
author | mat <github@matdoes.dev> | 2022-07-02 15:13:05 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-07-02 15:13:05 -0500 |
commit | d1f434f53c73c4b7f6327b168f38441732a4a843 (patch) | |
tree | 453db07fca9dd0b9bb0a201c9a239b8baa0d9852 /src | |
parent | aff11215ac2587d36f92b80c26a5f5d56f9c9b5e (diff) | |
download | skyblock-api-d1f434f53c73c4b7f6327b168f38441732a4a843.tar.gz skyblock-api-d1f434f53c73c4b7f6327b168f38441732a4a843.tar.bz2 skyblock-api-d1f434f53c73c4b7f6327b168f38441732a4a843.zip |
auction item lore
i sure hope this doesn't go terribly wrong and use up a bunch of space
Diffstat (limited to 'src')
-rw-r--r-- | src/database.ts | 4 | ||||
-rw-r--r-- | src/hypixel.ts | 1 |
2 files changed, 5 insertions, 0 deletions
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)) { |