Skip to main content

CreateRestManagerOptions

@discordeno/botDocs


Documentation / @discordeno/bot / CreateRestManagerOptions

Interface: CreateRestManagerOptions

Properties

applicationId?

optional applicationId: BigString

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

Default

bot id from token

Defined in

packages/rest/dist/types/types.d.ts:13


logger?

optional logger: Pick<object, "debug" | "info" | "warn" | "error" | "fatal">

The logger that the rest manager will use

Type declaration

debug()

debug: (...args) => void

Parameters

• ...args: any[]

Returns

void

error()

error: (...args) => void

Parameters

• ...args: any[]

Returns

void

fatal()

fatal: (...args) => void

Parameters

• ...args: any[]

Returns

void

info()

info: (...args) => void

Parameters

• ...args: any[]

Returns

void

log()

log: (level, ...args) => void

Parameters

level: LogLevels

• ...args: any[]

Returns

void

setDepth()

setDepth: (level) => void

Parameters

level: LogDepth

Returns

void

setLevel()

setLevel: (level) => void

Parameters

level: LogLevels

Returns

void

warn()

warn: (...args) => void

Parameters

• ...args: any[]

Returns

void

Default

logger // The logger exported by @discordeno/utils

Defined in

packages/rest/dist/types/types.d.ts:53


proxy?

optional proxy: object

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

Defined in

packages/rest/dist/types/types.d.ts:15


token

token: string

The bot token which will be used to make requests.

Defined in

packages/rest/dist/types/types.d.ts:8


version?

optional version: ApiVersions

The api versions which can be used to make requests.

Default

10

Defined in

packages/rest/dist/types/types.d.ts:48