UNPKG

dblstatistics.js

Version:

Official node module for interacting with the dblstats.com API

53 lines (52 loc) 1.45 kB
import './typings'; /** * dblstats API Client */ declare class Client { private token; /** * Creates a new DBL Stats Client intstance * @param token Your dblstats.com token */ constructor(token: string); private _request; /** * Gets a bots current information * @param id ID of the bot * @returns Bot information */ getBot(id: Snowflake): Promise<Bot>; /** * Fetch previous bot data, each packet is an hour apart * @param id ID of the bot * @param limit Amount of responses (default = 500) * @returns An array of bot information an hour apart */ getBotHistory(id: Snowflake, limit?: number): Promise<Bot[]>; /** * Get the top bots for a specific metric * @param by For which metric * @param limit Amount of responses * @returns Array of top bots for that metric */ getTop(by: LeaderboardType, limit?: number): Promise<Bot[]>; /** * Get the bots that a user owns * @param id The User's ID * @return An array of bots the user is owner on */ getUsersBots(id: Snowflake): Promise<{ user: User; bots: Bot[]; }>; /** * Get all auction tags * @returns Strings of tags, response.bot is bot tags and response.server is server tags */ getTags(): Promise<{ bot: string[]; server: string[]; }>; } export { Client }; export default Client;