Put user's name in the embed
This commit is contained in:
parent
3c3381847b
commit
b667f1ffb9
1 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ interface InventoryPageCards {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class InventoryHelper {
|
export default class InventoryHelper {
|
||||||
public static async GenerateInventoryPage(userid: string, page: number): Promise<{ embed: EmbedBuilder, row: ActionRowBuilder<ButtonBuilder> }> {
|
public static async GenerateInventoryPage(username: string, userid: string, page: number): Promise<{ embed: EmbedBuilder, row: ActionRowBuilder<ButtonBuilder> }> {
|
||||||
const cardsPerPage = 9;
|
const cardsPerPage = 9;
|
||||||
|
|
||||||
const inventory = await Inventory.FetchAllByUserId(userid);
|
const inventory = await Inventory.FetchAllByUserId(userid);
|
||||||
|
@ -76,9 +76,9 @@ export default class InventoryHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setTitle(`${currentPage.name} (${currentPage.seriesSubpage + 1})`)
|
.setTitle(username)
|
||||||
.setDescription(currentPage.cards.map(x => `[${x.id}] ${x.name} (${CardRarityToString(x.type)}) x${x.quantity}`).join('\n'))
|
.setDescription(currentPage.cards.map(x => `[${x.id}] ${x.name} (${CardRarityToString(x.type)}) x${x.quantity}`).join('\n'))
|
||||||
.setFooter({ text: `Page ${page} of ${pages.length}` })
|
.setFooter({ text: `${currentPage.name} (${currentPage.seriesSubpage + 1}) · Page ${page} of ${pages.length}` })
|
||||||
.setColor(EmbedColours.Ok);
|
.setColor(EmbedColours.Ok);
|
||||||
|
|
||||||
const row = new ActionRowBuilder<ButtonBuilder>()
|
const row = new ActionRowBuilder<ButtonBuilder>()
|
||||||
|
|
Loading…
Reference in a new issue