diff --git a/src/lib/util/handleTripFinish.ts b/src/lib/util/handleTripFinish.ts index 72fea97a9a..ece850d139 100644 --- a/src/lib/util/handleTripFinish.ts +++ b/src/lib/util/handleTripFinish.ts @@ -107,7 +107,14 @@ export async function handleTripFinish( user: MUser, channelID: string, _message: string | ({ content: string } & MessageCreateOptions), - attachment: AttachmentBuilder | Buffer | undefined, + attachment: + | AttachmentBuilder + | Buffer + | undefined + | { + name: string; + attachment: Buffer; + }, data: ActivityTaskData, loot: Bank | null, _messages?: string[], diff --git a/src/lib/util/makeBankImage.ts b/src/lib/util/makeBankImage.ts index 0e157267ce..27eb88f271 100644 --- a/src/lib/util/makeBankImage.ts +++ b/src/lib/util/makeBankImage.ts @@ -8,6 +8,7 @@ interface MakeBankImageOptions { content?: string; title?: string; background?: number; + spoiler?: boolean; flags?: Record; user?: MUser; previousCL?: Bank; @@ -21,6 +22,7 @@ export async function makeBankImage({ background, user, previousCL, + spoiler, showNewCL = false, flags = {}, mahojiFlags = [] @@ -40,7 +42,7 @@ export async function makeBankImage({ return { file: { - name: isTransparent ? 'bank.png' : 'bank.jpg', + name: `${spoiler ? 'SPOILER_' : ''}${isTransparent ? 'bank.png' : 'bank.jpg'}`, attachment: image! } }; diff --git a/src/tasks/minions/nexActivity.ts b/src/tasks/minions/nexActivity.ts index d692e7c384..4885d0f43b 100644 --- a/src/tasks/minions/nexActivity.ts +++ b/src/tasks/minions/nexActivity.ts @@ -92,9 +92,10 @@ ${loot.formatLoot()}` bank: loot.totalLoot(), title: `Loot From ${survivedQuantity}x Nex`, user: allMUsers[0], - previousCL: undefined + previousCL: undefined, + spoiler: loot.purpleItems.some(i => loot.totalLoot().has(i)) }) - ).file.attachment + ).file : undefined, data, loot.totalLoot()