SendRequestOptions
Documentation / @discordeno/rest / SendRequestOptions
Interface: SendRequestOptions
Defined in: types.ts:262
Properties
bucketId?
optionalbucketId?:string
Defined in: types.ts:276
If this request has a bucket id which it falls under for rate limit
method
method:
RequestMethods
Defined in: types.ts:266
The method to use for sending the request.
reject
reject: (
value) =>void
Defined in: types.ts:274
Reject handler when a request fails.
Parameters
value
Returns
void
requestBodyOptions?
optionalrequestBodyOptions?:CreateRequestBodyOptions
Defined in: types.ts:286
Additional request options, used for things like overriding authorization header.
resolve
resolve: (
value) =>void
Defined in: types.ts:272
Resolve handler when a request succeeds.
Parameters
value
Returns
void
retryCount
retryCount:
number
Defined in: types.ts:268
The amount of times this request has been retried.
retryRequest?
optionalretryRequest?: (options) =>Promise<void>
Defined in: types.ts:270
Handler to retry a request should it be rate limited.
Parameters
options
SendRequestOptions
Returns
Promise<void>
route
route:
string
Defined in: types.ts:264
The route to send the request to.
runThroughQueue?
optionalrunThroughQueue?:boolean
Defined in: types.ts:291
Whether the request should be run through the queue. Useful for routes which do not have any rate limits.
simplifiedUrl?
optionalsimplifiedUrl?:string
Defined in: types.ts:284
The simplified url of this request, as rest.simplifyUrl returned it when the request was first handled.
Remarks
The simplified url of a message delete depends on how old the message is, so it has to be kept instead of being worked out again later, or the key the queue was found under and the key its response is credited to stop matching once the message crosses one of those ages.