Skip to content

Commit

Permalink
refactor: improve rest bucket detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Smart committed Dec 2, 2022
1 parent 68e934a commit 1415b02
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/DiscordREST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const make = Do(($) => {
store.putBucket({
key: bucket,
resetAfter: retryAfter.millis,
limit,
limit: !hasBucket && remaining > 0 ? remaining : limit,
}),
)
}
Expand Down
5 changes: 0 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ const EnvLive = RateLimitEnv > (LiveConfig > Rest.LiveDiscordREST)

Rest.rest
.getGatewayBot()
.tap(({ data }) =>
Effect.sync(() => {
console.error(data)
}),
)
.repeatN(10)
.provideLayer(Log.LiveLogDebug >> EnvLive)
.unsafeRunPromise.catch(console.error)

0 comments on commit 1415b02

Please sign in to comment.