refactor(Collector): make endReason a getter (#5271)

This commit is contained in:
Jan
2021-03-28 15:29:39 +02:00
committed by GitHub
parent 09846c725b
commit 8d14ee3540
4 changed files with 11 additions and 16 deletions

View File

@@ -146,7 +146,7 @@ class ReactionCollector extends Collector {
this.checkEnd();
}
endReason() {
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';
if (this.options.maxUsers && this.users.size >= this.options.maxUsers) return 'userLimit';