Properties
Optional version
version?: number
Methods
createHeaders
- createHeaders(request: APIRequest<any>): Record<string, string>
Parameters
Returns Record<string, string>
execute
- execute(request: APIRequest<any>, tracefunc?: any): Promise<ResponseData>
Parameters
Returns Promise<ResponseData>
formatRoute
- formatRoute(route: `/${string}`, versioned?: boolean, useBase?: boolean): string
Parameters
route: `/${string}`
versioned: boolean = true
useBase: boolean = true
Returns string
Static createRESTOptions
Parameters
token: string
tokenType: "Bot" | "Bearer"
Utility class for easy HTTP requests to the Discord API. Can be used for other APIs if needed.