docs(Collector): properly document endReason (#6016)

This commit is contained in:
SpaceEEC
2021-07-03 14:23:15 +02:00
committed by GitHub
parent 568691ce6a
commit 7dd1a8da08
5 changed files with 24 additions and 8 deletions

View File

@@ -145,6 +145,11 @@ class ReactionCollector extends Collector {
this.checkEnd();
}
/**
* The reason this collector has ended with, or null if it hasn't ended yet
* @type {?string}
* @readonly
*/
get endReason() {
if (this.options.max && this.total >= this.options.max) return 'limit';
if (this.options.maxEmojis && this.collected.size >= this.options.maxEmojis) return 'emojiLimit';