Create simple inventory list #120
1 changed files with 8 additions and 2 deletions
|
@ -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 ],
|
||||||
|
|
Loading…
Reference in a new issue