Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RESTClient

Utility class for easy HTTP requests to the Discord API. Can be used for other APIs if needed.

Hierarchy

  • RESTClient

Index

Constructors

Properties

baseUrl: string
version?: number

API version to add to the RESTClient.baseUrl. Leave empty to not add a version at all.

Methods

  • createHeaders(request: APIRequest<any>): Record<string, string>
  • execute(request: APIRequest<any>, tracefunc?: any): Promise<ResponseData>
  • formatRoute(route: `/${string}`, versioned?: boolean, useBase?: boolean): string
  • Parameters

    • route: `/${string}`
    • versioned: boolean = true
    • useBase: boolean = true

    Returns string

Generated using TypeDoc