CreateRestManagerOptions
Documentation / @discordeno/rest / CreateRestManagerOptions
Interface: CreateRestManagerOptions
Defined in: types.ts:160
Properties
applicationId?
optionalapplicationId:BigString
Defined in: types.ts:167
For old bots that have a different bot id and application id.
Default
bot id from token
events?
optionalevents:Partial<RestManagerEvents>
Defined in: types.ts:209
Events for the rest manager
logger?
optionallogger:Pick<{ },"debug"|"info"|"warn"|"error"|"fatal">
Defined in: types.ts:207
The logger that the rest manager will use
Default
logger // The logger exported by @discordeno/utils
proxy?
optionalproxy:object
Defined in: types.ts:169
Configuration when using a proxy.
authorization?
optionalauthorization:string
The authorization header value to attach when sending requests to the proxy.
authorizationHeader?
optionalauthorizationHeader: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?
optionalupdateBearerTokenEndpoint: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: types.ts:162
The bot token which will be used to make requests.
version?
optionalversion:ApiVersions
Defined in: types.ts:202
The api versions which can be used to make requests.
Default
10