Skip to main content

SendRequestOptions

@discordeno/botDocs


Documentation / @discordeno/bot / SendRequestOptions

Interface: SendRequestOptions

Properties

bucketId?

optional bucketId: string

If this request has a bucket id which it falls under for rate limit

Defined in

packages/rest/dist/types/types.d.ts:2938


method

method: RequestMethods

The method to use for sending the request.

Defined in

packages/rest/dist/types/types.d.ts:2928


reject()

reject: (value) => void

Reject handler when a request fails.

Parameters

value: RestRequestRejection

Returns

void

Defined in

packages/rest/dist/types/types.d.ts:2936


requestBodyOptions?

optional requestBodyOptions: CreateRequestBodyOptions

Additional request options, used for things like overriding authorization header.

Defined in

packages/rest/dist/types/types.d.ts:2940


resolve()

resolve: (value) => void

Resolve handler when a request succeeds.

Parameters

value: RestRequestResponse

Returns

void

Defined in

packages/rest/dist/types/types.d.ts:2934


retryCount

retryCount: number

The amount of times this request has been retried.

Defined in

packages/rest/dist/types/types.d.ts:2930


retryRequest()?

optional retryRequest: (options) => Promise<void>

Handler to retry a request should it be rate limited.

Parameters

options: SendRequestOptions

Returns

Promise<void>

Defined in

packages/rest/dist/types/types.d.ts:2932


route

route: string

The route to send the request to.

Defined in

packages/rest/dist/types/types.d.ts:2926


runThroughQueue?

optional runThroughQueue: boolean

Whether the request should be run through the queue. Useful for routes which do not have any rate limits.

Defined in

packages/rest/dist/types/types.d.ts:2945