Options
All
  • Public
  • Public/Protected
  • All
Menu

Rest manager

Hierarchy

Index

Constructors

  • new RESTManager(bio: Bio, __namedParameters?: { base_url: string; cdn_url: string }): RESTManager

Properties

api: (path: string, method: HTTPRequestMethod, headers?: any, body?: string | Buffer | FormData) => Promise<any>

Type declaration

    • (path: string, method: HTTPRequestMethod, headers?: any, body?: string | Buffer | FormData): Promise<any>
    • API shortcut

      Parameters

      • path: string

        The api route including the first /

      • method: HTTPRequestMethod

        The HTTP request method

      • Optional headers: any

        Custom headers

      • Optional body: string | Buffer | FormData

        Request body

      Returns Promise<any>

base_url: string

The base URL used in making API requests

bio: Bio

The bio instance that instantiated this

cdn_url: string

The URL to discord's CDN

limit: number

Maximum number of requests in a timeframe

outgoing_requests: number

Number of sent requests that havn't received a

quota: number

Number of request remaining before getting rate-limited

quota_reset: number

The time when the quota is getting reseted

Generated using TypeDoc