Update the series view command to be in greyscale if the user has not claimed the card (#297)
All checks were successful
Deploy To Stage / build (push) Successful in 10s
Deploy To Stage / deploy (push) Successful in 17s

- Install `Jimp` package so we can manipulate images
- Update the `ImageHelper` class to accept the user id so we can check if a user has claimed the card
- Update the `/series view` command to pass the user id into the ImageHelper

#279

Reviewed-on: #297
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
Ethan Lane 2024-07-12 17:35:12 +01:00 committed by Vylpes
parent 29bb22a819
commit b6f814f895
8 changed files with 575 additions and 15 deletions

View file

@ -112,7 +112,7 @@ export default class InventoryHelper {
.setStyle(ButtonStyle.Primary)
.setDisabled(page + 1 == pages.length));
const buffer = await ImageHelper.GenerateCardImageGrid(currentPage.cards.map(x => x.path));
const buffer = await ImageHelper.GenerateCardImageGrid(currentPage.cards.map(x => ({ id: x.id, path: x.path })));
const image = new AttachmentBuilder(buffer, { name: "page.png" });
return { embed, row, image };