Skip to main content

CreateRestManagerOptions

@discordeno/rest


Documentation / @discordeno/rest / CreateRestManagerOptions

Interface: CreateRestManagerOptions

Defined in: rest/src/types.ts:140

Properties

applicationId?

optional applicationId: BigString

Defined in: rest/src/types.ts:147

For old bots that have a different bot id and application id.

Default

bot id from token

logger?

optional logger: Pick<{ debug: (...args) => void; error: (...args) => void; fatal: (...args) => void; info: (...args) => void; log: (level, ...args) => void; setDepth: (level) => void; setLevel: (level) => void; warn: (...args) => void; }, "debug" | "info" | "warn" | "error" | "fatal">

Defined in: rest/src/types.ts:187

The logger that the rest manager will use

Default

logger // The logger exported by @discordeno/utils


proxy?

optional proxy: object

Defined in: rest/src/types.ts:149

Configuration when using a proxy.

authorization?

optional authorization: string

The authorization header value to attach when sending requests to the proxy.

authorizationHeader?

optional authorizationHeader: string

The authorization header name to use when sending requests to the proxy

Remarks

If the header name is set to authorization, it will override any authorization that is given even if the requests uses OAuth2 Bearer tokens / Basic tokens

Default
"authorization" // For compatibility purposes

baseUrl

baseUrl: string

The base url to connect to. If you create a proxy rest, that url would go here. IT SHOULD NOT END WITH A /

Default
https://discord.com/api

updateBearerTokenEndpoint?

optional updateBearerTokenEndpoint: string

The endpoint to use in the rest proxy to update the bearer tokens

Remarks

Should not include a / in the start

This value is actually required if you want to use updateTokenQueues


token

token: string

Defined in: rest/src/types.ts:142

The bot token which will be used to make requests.


version?

optional version: ApiVersions

Defined in: rest/src/types.ts:182

The api versions which can be used to make requests.

Default

10