CreateRestManagerOptions
Documentation / @discordeno/bot / CreateRestManagerOptions
Interface: CreateRestManagerOptions
Defined in: packages/rest/dist/types/types.d.ts:6
Properties
applicationId?
optional
applicationId:BigString
Defined in: packages/rest/dist/types/types.d.ts:13
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: packages/rest/dist/types/types.d.ts:53
The logger that the rest manager will use
Default
logger // The logger exported by @discordeno/utils
proxy?
optional
proxy:object
Defined in: packages/rest/dist/types/types.d.ts:15
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: packages/rest/dist/types/types.d.ts:8
The bot token which will be used to make requests.
version?
optional
version:ApiVersions
Defined in: packages/rest/dist/types/types.d.ts:48
The api versions which can be used to make requests.
Default
10