diff --git a/src/helpers/Pagination/TestPage.ts b/src/helpers/Pagination/TestPage.ts index 7eb1f3f..87cc4ec 100644 --- a/src/helpers/Pagination/TestPage.ts +++ b/src/helpers/Pagination/TestPage.ts @@ -5,6 +5,6 @@ export default class TestPage extends EmbedPage { super(embedId, page, total); this.setTitle("Test Embed"); - this.setDescription(`You are viewing page ${page}`); + this.setDescription(`You are viewing page ${page + 1}`); } } \ No newline at end of file diff --git a/src/type/embedPage.ts b/src/type/embedPage.ts index 82577f5..0099aa1 100644 --- a/src/type/embedPage.ts +++ b/src/type/embedPage.ts @@ -6,19 +6,19 @@ export default class EmbedPage extends EmbedBuilder { constructor(embedId: string, page: number, total: number) { super(); - this.setFooter({ text: `Page ${page} of ${total}`}); + this.setFooter({ text: `Page ${page + 1} of ${total + 1}`}); this.row = new ActionRowBuilder(); this.row.addComponents( new ButtonBuilder() .setCustomId(`pagination ${embedId} previous`) - .setLabel("<") + .setLabel("◀️") .setStyle(ButtonStyle.Primary) .setDisabled(page == 0), new ButtonBuilder() .setCustomId(`pagination ${embedId} next`) - .setLabel(">") + .setLabel("▶️") .setStyle(ButtonStyle.Primary) .setDisabled(page == total)); } @@ -31,9 +31,10 @@ export default class EmbedPage extends EmbedBuilder { } public async sendButtonEmbed(interaction: ButtonInteraction) { - await interaction.reply({ + await interaction.update({ embeds: [ this ], components: [ this.row ], }); + return; } } \ No newline at end of file