Type Alias RateLimit

RateLimit: {
    bucket: string;
    endpoint: Endpoint | null;
    isGlobal: boolean;
    limit: number;
    remaining: number;
    reset: number;
    resetAfter: number;
    resetDate: Date;
}

Represents a rate limit.

Type declaration

  • bucket: string

    The bucket that this rate limit belongs to.

  • endpoint: Endpoint | null

    Endpoint that this rate limit belongs to. This will be null if isGlobal is true.

  • isGlobal: boolean

    If true, this rate limit is global.

  • limit: number

    The number of requests that can be made.

  • remaining: number

    The number of remaining requests that can be made.

  • reset: number

    Epoch time at which this rate limit resets.

  • resetAfter: number

    Total time (in seconds) of when the current rate limit bucket will reset.

  • resetDate: Date

    Date at which this rate limit resets.