Update the series view command to be in greyscale if the user has not claimed the card (#297)
- 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:
parent
29bb22a819
commit
b6f814f895
8 changed files with 575 additions and 15 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue