mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 22:53:06 -04:00
the previous one didnt work
This commit is contained in:
parent
ccc8fb0a9f
commit
8f8d3db252
1 changed files with 6 additions and 5 deletions
|
@ -159,11 +159,6 @@ module.exports = class Paginator {
|
|||
}
|
||||
if(listener) await listener.stop()
|
||||
|
||||
// No need for a paginator if we only have one page.
|
||||
if(data.pages.length == 1){
|
||||
data.buttons = data.buttons.filter((i)=>!["next","previous"].includes(i))
|
||||
}
|
||||
|
||||
const instance = new InteractionPaginator(this, data);
|
||||
this.activeListeners.push(instance);
|
||||
|
||||
|
@ -174,6 +169,12 @@ module.exports = class Paginator {
|
|||
// Edit below to change default button set
|
||||
this.buttons = typeof data.buttons !== "object" ? ["previous", "next"] : data.buttons;
|
||||
|
||||
// No need for a paginator if we only have one page.
|
||||
if(data.pages.length == 1){
|
||||
if(this.buttons) this.buttons = this.buttons.filter((i)=>!["next","previous"].includes(i))
|
||||
}
|
||||
|
||||
|
||||
if (instance.commandMessage === null && data.pages) {
|
||||
await instance.init();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue