Create simple inventory list #120

Merged
Vylpes merged 10 commits from feature/97-simple-inventory-list into develop 2023-12-22 14:41:14 +00:00
Showing only changes of commit fa9a84dbe6 - Show all commits

View file

@ -8,11 +8,17 @@ export default class Inventory extends Command {
this.CommandBuilder = new SlashCommandBuilder() this.CommandBuilder = new SlashCommandBuilder()
.setName('inventory') .setName('inventory')
.setDescription('View your inventory'); .setDescription('View your inventory')
.addNumberOption(x =>
x
.setName('page')
.setDescription('The page to start with'));
} }
public override async execute(interaction: CommandInteraction) { public override async execute(interaction: CommandInteraction) {
const embed = await InventoryHelper.GenerateInventoryPage(interaction.user.username, interaction.user.id, 0); const page = interaction.options.get('page');
const embed = await InventoryHelper.GenerateInventoryPage(interaction.user.username, interaction.user.id, page ? Number(page.value) : 0);
await interaction.reply({ await interaction.reply({
embeds: [ embed.embed ], embeds: [ embed.embed ],