Add dropdown to /inventory command for quick navigation #365

Merged
Vylpes merged 6 commits from feature/344-inventory-dropdown into develop 2024-09-21 18:09:24 +01:00
Showing only changes of commit c115cd92a1 - Show all commits

View file

@ -113,6 +113,8 @@ export default class InventoryHelper {
.setStyle(ButtonStyle.Primary)
.setDisabled(page + 1 == pages.length));
let pageNum = 0;
const row2 = new ActionRowBuilder<StringSelectMenuBuilder>()
.addComponents(
new StringSelectMenuBuilder()
@ -123,7 +125,7 @@ export default class InventoryHelper {
.setLabel(`${x.name} (${x.seriesSubpage + 1})`.substring(0, 100))
.setDescription("Quick navigate to page...")
.setDefault(currentPage.id == x.id)
.setValue(x.id.toString()))));
.setValue((pageNum++).toString()))));
const buffer = await ImageHelper.GenerateCardImageGrid(currentPage.cards.map(x => ({ id: x.id, path: x.path })));
const image = new AttachmentBuilder(buffer, { name: "page.png" });