Interface RESTOptions

Hierarchy

  • RESTOptions

Properties

agent?: null | Agent

The agent to use for requests.

Default Value

null

baseURL?: string

The base URL to use for requests - must be a fully qualified url.

Default Value

https://discordapp.com/api/v{REST_VERSION}

disableLatencyCompensation?: boolean

If the built-in latency compensator should be disabled.

Default Value

false

host?: string

The Host header to use for requests.

Default Value

Parsed from baseURL

latencyThreshold?: number

In milliseconds, the average request latency at which to start emitting latency errors.

Default Value

30000

ratelimiterOffset?: number

In milliseconds, the time to offset ratelimit calculations by.

Default Value

0

requestTimeout?: number

In milliseconds, how long to wait until a request is timed out.

Default Value

15000

superProperties?: null | string | Record<string, unknown>

A value for the X-Super-Properties header, sent with all requests if present. This can be used to reveal some properties only visible to >= client builds. Provide either an object, or a base64 encoded string.

Example

eyJjbGllbnRfYnVpbGRfbnVtYmVyIjoxNjI5OTJ9

Example

{ client_build_number: 162992 }

Default Value

null

userAgent?: string

The User-Agent header to use for requests.

Default Value

Oceanic/{VERSION} (https://github.com/OceanicJS/Oceanic)