The base api path, without version
'https://discord.com/api'
The authorization prefix to use for requests, useful if you want to use bearer tokens
'Bot'
The cdn path
'https://cdn.discordapp.com'
How many requests to allow sending per second (Infinity for unlimited, 50 for the standard global limit used by Discord)
50
The amount of time in milliseconds that passes between each hash sweep. (defaults to 1h)
3_600_000
The maximum amount of time a hash can exist in milliseconds without being hit with a request (defaults to 24h)
86_400_000
The amount of time in milliseconds that passes between each hash sweep. (defaults to 4h)
14_400_000
Additional headers to send for all API requests
{}
The number of invalid REST requests (those that return 401, 403, or 429) in a 10 minute window between emitted warnings (0 for no warnings). That is, if set to 500, warnings will be emitted at invalid request number 500, 1000, 1500, and so on.
0
The media proxy path
'https://media.discordapp.net'
The extra offset to add to rate limits in milliseconds
50
Determines how rate limiting and pre-emptive throttling should be handled.
When an array of strings, each element is treated as a prefix for the request route
(e.g. /channels
to match any route starting with /channels
such as /channels/:id/messages
)
for which to throw RateLimitErrors. All other request routes will be queued normally
null
The number of retries for errors with the 500 code, or errors that timeout
3
Optional
storeOptional
storeConverts a JavaScript Object Notation (JSON) string into an object.
A valid JSON string.
Optional
reviver: ((this, key, value) => any)A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.
Optional
storeConverts a JavaScript value to a JavaScript Object Notation (JSON) string.
A JavaScript value, usually an object or array, to be converted.
Optional
replacer: ((this, key, value) => any)A function that transforms the results.
Optional
space: string | numberAdds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
A JavaScript value, usually an object or array, to be converted.
Optional
replacer: (string | number)[]An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
Optional
space: string | numberAdds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
The time to wait in milliseconds before a request is aborted
15_000
Extra information to add to the user agent
DefaultUserAgentAppendix
The version of the API to use
'10'
Generated using TypeDoc
The agent to set globally