Skip to main content

InvalidRequestBucketOptions

@discordeno/restDocs


Documentation / @discordeno/rest / InvalidRequestBucketOptions

Interface: InvalidRequestBucketOptions

Properties

current?

optional current: number

current invalid amount

Defined in

rest/src/invalidBucket.ts:105


errorStatuses?

optional errorStatuses: number[]

The request statuses that count as an invalid request.

Defined in

rest/src/invalidBucket.ts:115


interval?

optional interval: number

The time that discord allows to make the max number of invalid requests. Defaults to 10 minutes

Defined in

rest/src/invalidBucket.ts:109


logger?

optional logger: Pick<object, "debug" | "info" | "warn" | "error" | "fatal">

The logger that will be used for the bucket

Type declaration

debug()

debug: (...args) => void

Parameters

• ...args: any[]

Returns

void

error()

error: (...args) => void

Parameters

• ...args: any[]

Returns

void

fatal()

fatal: (...args) => void

Parameters

• ...args: any[]

Returns

void

info()

info: (...args) => void

Parameters

• ...args: any[]

Returns

void

log()

log: (level, ...args) => void

Parameters

level: LogLevels

• ...args: any[]

Returns

void

setDepth()

setDepth: (level) => void

Parameters

level: LogDepth

Returns

void

setLevel()

setLevel: (level) => void

Parameters

level: LogLevels

Returns

void

warn()

warn: (...args) => void

Parameters

• ...args: any[]

Returns

void

Defined in

rest/src/invalidBucket.ts:119


max?

optional max: number

max invalid requests allowed until ban. Defaults to 10,000

Defined in

rest/src/invalidBucket.ts:107


requested?

optional requested: number

The amount of requests that were requested from this bucket.

Defined in

rest/src/invalidBucket.ts:117


resetAt?

optional resetAt: number

When the timeout for the bucket has started at.

Defined in

rest/src/invalidBucket.ts:111


safety?

optional safety: number

how safe to be from max. Defaults to 1

Defined in

rest/src/invalidBucket.ts:113