Skip to content

Commit

Permalink
Add max option back for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl committed May 16, 2017
1 parent 8beefe6 commit 4955b1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/structures/MessageCollector.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class MessageCollector extends Collector {
* @private
*/
postCheck() {
if (this.collected.size >= this.options.max) return 'limit';
else if (this.options.maxProcessed && this.received === this.options.maxProcessed) return 'processedLimit';
if (this.options.max && this.collected.size >= this.options.max) return 'limit';
if (this.options.maxProcessed && this.received === this.options.maxProcessed) return 'processedLimit';
return null;
}

Expand Down

0 comments on commit 4955b1c

Please sign in to comment.