Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Bucket

Index

Constructors

constructor

  • new Bucket(key: string): Bucket

Properties

Readonly key

key: string = ''

locked

locked: boolean = false

lockedUntil

lockedUntil: number = 0

queue

queue: RatelimitQueue[] = []

Readonly ratelimit

ratelimit: RatelimitDetails = ...

Readonly timeout

timeout: Timeout = ...

Accessors

length

  • get length(): number

size

  • get size(): number

unlockIn

  • get unlockIn(): number

Methods

add

lock

  • lock(unlockIn: number): void

reset

  • reset(): void

setRatelimit

  • setRatelimit(limit: number, remaining: number, reset: number, resetAfter: number): Bucket
  • Parameters

    • limit: number
    • remaining: number
    • reset: number
    • resetAfter: number

    Returns Bucket

shift

  • shift(): void

Generated using TypeDoc