From 8beefe66d5ef9d9a856c432e5937051cef5760fe Mon Sep 17 00:00:00 2001 From: Crawl Date: Tue, 16 May 2017 04:47:53 +0200 Subject: [PATCH] Fix MessageCollector#postCheck --- src/structures/MessageCollector.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index e05929c09..5ffa2bdd3 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -3,7 +3,7 @@ const Collector = require('./interfaces/Collector'); /** * @typedef {CollectorOptions} MessageCollectorOptions * @property {number} max The maximum amount of messages to process - * @property {number} maxMatches The maximum amount of messages to collect + * @property {number} maxProcessed The maximum amount of messages to collect */ /** @@ -56,9 +56,8 @@ class MessageCollector extends Collector { * @private */ postCheck() { - // Consider changing the end reasons for v12 - if (this.options.maxMatches && this.collected.size >= this.options.max) return 'matchesLimit'; - if (this.options.max && this.received >= this.options.maxProcessed) return 'limit'; + if (this.collected.size >= this.options.max) return 'limit'; + else if (this.options.maxProcessed && this.received === this.options.maxProcessed) return 'processedLimit'; return null; }