Class AmariBot

Hierarchy

  • AmariBot

Constructors

  • Description

    This is the main class that you initalize to perform all the requests to the API

    Parameters

    • apiKey: string

      The token you use to authenticate to the API

    • options: AmariBotOptions = {}

      Additional options for the API handler

    Returns AmariBot

Properties

_requestHandler: RequestHandler
apiKey: string
baseURL: string
customFetch?: CustomFetch
debug: boolean
version: string

Methods

  • Private

    Parameters

    • endpoint: string
    • query: {
          [key: string]: string | number;
      } = {}
      • [key: string]: string | number
    • method: string = "GET"
    • body: {
          [key: string]: any;
      } = {}
      • [key: string]: any

    Returns Promise<unknown>

  • Description

    Combines the main leaderboard and the weekly leaderboard into one

    Parameters

    • guildId: string

    Returns Promise<{
        count: number;
        data: APIUser[];
    }>

  • Parameters

    • guildId: string
    • userId: string

    Returns Promise<number>

  • Parameters

    • level: number

    Returns number

  • Parameters

    • guildId: string
    • userId: string | string[]

    Returns Promise<APIUser>

  • Parameters

    • guildId: string
    • userId: string

    Returns Promise<number>

Generated using TypeDoc