Add dropdown to /inventory command for quick navigation #365
1 changed files with 3 additions and 1 deletions
|
@ -113,6 +113,8 @@ export default class InventoryHelper {
|
||||||
.setStyle(ButtonStyle.Primary)
|
.setStyle(ButtonStyle.Primary)
|
||||||
.setDisabled(page + 1 == pages.length));
|
.setDisabled(page + 1 == pages.length));
|
||||||
|
|
||||||
|
let pageNum = 0;
|
||||||
|
|
||||||
const row2 = new ActionRowBuilder<StringSelectMenuBuilder>()
|
const row2 = new ActionRowBuilder<StringSelectMenuBuilder>()
|
||||||
.addComponents(
|
.addComponents(
|
||||||
new StringSelectMenuBuilder()
|
new StringSelectMenuBuilder()
|
||||||
|
@ -123,7 +125,7 @@ export default class InventoryHelper {
|
||||||
.setLabel(`${x.name} (${x.seriesSubpage + 1})`.substring(0, 100))
|
.setLabel(`${x.name} (${x.seriesSubpage + 1})`.substring(0, 100))
|
||||||
.setDescription("Quick navigate to page...")
|
.setDescription("Quick navigate to page...")
|
||||||
.setDefault(currentPage.id == x.id)
|
.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 buffer = await ImageHelper.GenerateCardImageGrid(currentPage.cards.map(x => ({ id: x.id, path: x.path })));
|
||||||
const image = new AttachmentBuilder(buffer, { name: "page.png" });
|
const image = new AttachmentBuilder(buffer, { name: "page.png" });
|
||||||
|
|
Loading…
Reference in a new issue