Carbon
Core/Type Aliases

RequestClientOptions

RequestClientOptions = object

The options used to initialize the RequestClient

Properties

apiVersion?

optional apiVersion: number

The version of the API to use.

Default

10

baseUrl?

optional baseUrl: string

The base URL of the API.

Default

https://discord.com/api

queueRequests?

optional queueRequests: boolean

Whether or not to queue requests if you are rate limited. If this is true, requests will be queued and wait for the ratelimit to clear. If this is false, requests will be made immediately and will throw a RateLimitError if you are rate limited.

Default

true

timeout?

optional timeout: number

The timeout for requests.

Default

15000

tokenHeader?

optional tokenHeader: "Bot" | "Bearer"

The header used to send the token in the request. This should generally always be "Bot" unless you are working with OAuth.

Default

"Bot"

userAgent?

optional userAgent: string

The user agent to use when making requests.

Default

DiscordBot (https://github.com/buape/carbon, v0.0.0)

On this page