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');