diff --git a/src/structures/interfaces/Collector.js b/src/structures/interfaces/Collector.js index 4742227c034b..b57dd1634848 100644 --- a/src/structures/interfaces/Collector.js +++ b/src/structures/interfaces/Collector.js @@ -207,7 +207,6 @@ class Collector extends EventEmitter { /** * Resets the collector's timeout and idle timer. * @param {CollectorResetTimerOptions} [options] Options for reseting - */ resetTimer({ time, idle } = {}) { if (this._timeout) { @@ -222,10 +221,12 @@ class Collector extends EventEmitter { /** * Checks whether the collector should end, and if so, ends it. + * @returns {boolean} Whether the collector ended or not */ checkEnd() { const reason = this.endReason; if (reason) this.stop(reason); + return Boolean(reason); } /** diff --git a/typings/index.d.ts b/typings/index.d.ts index 520f5b6bc8b2..b7520fef252e 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -450,7 +450,7 @@ export abstract class Collector extends EventEmi public filter: CollectorFilter<[V, ...F]>; public readonly next: Promise; public options: CollectorOptions<[V, ...F]>; - public checkEnd(): void; + public checkEnd(): boolean; public handleCollect(...args: unknown[]): Promise; public handleDispose(...args: unknown[]): Promise; public stop(reason?: string): void;