From eefbaf43fadc5523d79ecaf871f88639190979d8 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Thu, 23 Dec 2021 02:20:47 -0700 Subject: [PATCH] lazy dev moment --- util/pagination.d.ts | 1 + util/pagination.js | 3 +++ util/ts/pagination.ts | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/util/pagination.d.ts b/util/pagination.d.ts index e21ece0..eede6c9 100644 --- a/util/pagination.d.ts +++ b/util/pagination.d.ts @@ -20,6 +20,7 @@ export declare class Pagination { endControllers(): Promise; start(options?: { endTime?: number; + time?: number; startPage?: number; user?: 'any' | string; }): Promise; diff --git a/util/pagination.js b/util/pagination.js index 6a872dd..f65e0d1 100644 --- a/util/pagination.js +++ b/util/pagination.js @@ -125,6 +125,9 @@ class Pagination { } ; async start(options) { + if (options && options.time) { + options.endTime = options.time; + } await this.setPage(options && options.startPage ? options.startPage : 0); await this.setControllers(options && options.endTime ? options.endTime : 60, options && options.user ? options.user : 'any'); return this; diff --git a/util/ts/pagination.ts b/util/ts/pagination.ts index 4d82fb6..39262ec 100644 --- a/util/ts/pagination.ts +++ b/util/ts/pagination.ts @@ -135,7 +135,8 @@ export class Pagination { }; - public async start(options?: {endTime?: number, startPage?: number, user?: 'any' | string}): Promise { + public async start(options?: {endTime?: number, time?: number, startPage?: number, user?: 'any' | string}): Promise { + if (options && options.time) {options.endTime = options.time;} await this.setPage(options && options.startPage ? options.startPage : 0); await this.setControllers(options && options.endTime ? options.endTime : 60, options && options.user ? options.user : 'any');