Skip to content

top-stats/javascript-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dblstatistics.js

An official module for interacting with dblstatistics.com API

Installation

npm i dblstatistics.js

Usage

const DBLStats = require('dblstatistics.js')

const dbl = new DBLStats('Your token')

// e.g
await dbl.getBot('id') // bot info

Methods

Returns information on a given bot

dbl.getBot(id)

id = ID of the bot

dbl.getBotHistory(id, limit)

Returns the historical data separated by hour

id = ID of the bot

limit = Amount of data to fetch

dbl.getTop(by, limit)

Fetches leaderboard for given list

by = Which list to fetch, options = servers, votes, monthly votes, shards

limit = Amount of data to fetch

dbl.getUsersBots(id)

Gives .user as user object and .bots is a list of bots the user owns

id = ID of the user

dbl.getTags()

Returns a list of tags .server is those for servers, and .bot is those for bots

About

The Javascript Library for dblstatistics.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published