Skip to content

Commit

Permalink
fix(bot-router): .getBotForUrl now respects Bot rate-limits
Browse files Browse the repository at this point in the history
select bots only if usage is within rate-limit
  • Loading branch information
Siddarth authored and MichaelHirn committed Sep 9, 2020
1 parent ee3ace4 commit 1f63a1a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/bots/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,7 @@ export class Bot {
if(this.rateLimit === 0) {
return true
}
if(this.getUsage() < this.rateLimit) {
return true
}
return false
return this.getUsage() < this.rateLimit
}

/**
Expand Down

0 comments on commit 1f63a1a

Please sign in to comment.