Fix some improvements suggested
All checks were successful
Test / build (push) Successful in 15s

This commit is contained in:
Ethan Lane 2024-12-07 17:29:33 +00:00
parent 7429500540
commit 399e9af75a
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ export default class Effects extends Command {
private async List(interaction: CommandInteraction) {
const pageOption = interaction.options.get("page");
const page = pageOption && Number(pageOption.value) ? Number(pageOption.value) : 1;
const page = !isNaN(Number(pageOption?.value)) ? Number(pageOption?.value) : 1;
const result = await EffectHelper.GenerateEffectEmbed(interaction.user.id, page);

View file

@ -80,7 +80,7 @@ export default class EffectHelper {
.setCustomId(`effects list ${page - 1}`)
.setLabel("Previous")
.setStyle(ButtonStyle.Primary)
.setDisabled(page - 1 == 0),
.setDisabled(page == 1),
new ButtonBuilder()
.setCustomId(`effects list ${page + 1}`)
.setLabel("Next")