Skip to main content

InvalidRequestBucketOptions

@discordeno/rest


Documentation / @discordeno/rest / InvalidRequestBucketOptions

Interface: InvalidRequestBucketOptions

Defined in: rest/src/invalidBucket.ts:103

Properties

current?

optional current: number

Defined in: rest/src/invalidBucket.ts:105

current invalid amount


errorStatuses?

optional errorStatuses: number[]

Defined in: rest/src/invalidBucket.ts:115

The request statuses that count as an invalid request.


interval?

optional interval: number

Defined in: rest/src/invalidBucket.ts:109

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


logger?

optional logger: Pick<{ debug: (...args) => void; error: (...args) => void; fatal: (...args) => void; info: (...args) => void; log: (level, ...args) => void; setDepth: (level) => void; setLevel: (level) => void; warn: (...args) => void; }, "debug" | "info" | "warn" | "error" | "fatal">

Defined in: rest/src/invalidBucket.ts:119

The logger that will be used for the bucket


max?

optional max: number

Defined in: rest/src/invalidBucket.ts:107

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


requested?

optional requested: number

Defined in: rest/src/invalidBucket.ts:117

The amount of requests that were requested from this bucket.


resetAt?

optional resetAt: number

Defined in: rest/src/invalidBucket.ts:111

When the timeout for the bucket has started at.


safety?

optional safety: number

Defined in: rest/src/invalidBucket.ts:113

how safe to be from max. Defaults to 1