devRael1 / discordjs-pagination

A pagination system for Discord.js v14
https://www.npmjs.com/package/@devraelfreeze/discordjs-pagination
MIT License
11 stars 10 forks source link

Pagination page travel #6

Closed Grayy12 closed 1 year ago

Grayy12 commented 1 year ago

If you type any number in the range of pages, the number button has a bug that always sets it to 1. I wanted to let you know, but I've already created a simple fix.

On line 137 - 147 in the pagination.js

if (int > embeds.length) {
    currentPage = embeds.length;
}
else {
    if (int <= 0) {
        currentPage = 1;
    }
    else {
        currentPage = int;
    }
 }

I changed it to this.

devRael1 commented 1 year ago

Oh my god the huge code error ahah I am ashamed. Thank you for telling me. I patch this in the futur update of the package.

Grayy12 commented 1 year ago

Np :)