Options
All
  • Public
  • Public/Protected
  • All
Menu

Bucket used for saving ratelimits

Hierarchy

  • LocalBucket

Index

Constructors

  • Create a new bucket

    Parameters

    Returns <internal>.LocalBucket

Properties

_remaining: number

Remaining amount of executions during the current timeframe

fnQueue: { callback: any; fn: any }[]

array of functions waiting to be executed

limit: number

Number of functions that may be executed during the timeframe set in limitReset

ratelimiter: <internal>.Ratelimiter

ratelimiter used for ratelimiting requests

reset: number

Timeframe in milliseconds until the ratelimit resets

resetAt: null | number

The Date time in which the bucket will reset

Accessors

  • get remaining(): number
  • set remaining(value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

Methods

  • checkQueue(): void
  • Check if there are any functions in the queue that haven't been executed yet

    Returns void

  • dropQueue(): void
  • Clear the current queue of events to be sent

    Returns void

  • resetRemaining(): void
  • Reset the remaining tokens to the base limit

    Returns void

Generated using TypeDoc