A ratelimit bucket.

Hierarchy

  • SequentialBucket

Constructors

Properties

Methods

Constructors

Properties

last: number
latencyRef: LatencyRef
limit: number
processing: boolean | Timeout = false
remaining: number
reset: number = 0

Methods

  • add an item to the queue

    Returns

    Parameters

    • func: ((cb: (() => void)) => void)

      the function to queue

        • (cb: (() => void)): void
        • Parameters

          • cb: (() => void)
              • (): void
              • Returns void

          Returns void

    • Optional priority: boolean = false

      if true, the item will be added to the front of the queue

    Returns void