Client

Client

new Client()

Creates a new client.
Source:

Methods

getBot(id) → {Promise}

Returns information on the specified bot.
Parameters:
Name Type Description
id Number The bot id.
Source:
Returns:
The returned data.
Type
Promise

getBots() → {Promise}

Returns all bots on the site.
Source:
Returns:
The returned data.
Type
Promise

getCurrent() → {Promise}

Returns information about the current bot.
Source:
Returns:
The returned data.
Type
Promise

getStats() → {Promise}

Gets useful statistics aboutthe list.
Source:
Returns:
The returned data.
Type
Promise

getVotes() → {Promise}

Returns all votes for the current bot.
Source:
Returns:
The returned data.
Type
Promise

hasVoted24() → {Promise}

Check if a user has voted for the bot in the past 24 hours.
Source:
Returns:
The returned data.
Type
Promise

updateCount(count) → {Promise}

Posts server count to the website.
Parameters:
Name Type Description
count number | Array.<number> The server count, or array of server count as shards.
Source:
Returns:
The returned data.
Type
Promise

Client

new Client(id, token)

Parameters:
Name Type Description
id String The bot id.
token String The bot token.
Source:

Methods

getBot(id) → {Promise}

Returns information on the specified bot.
Parameters:
Name Type Description
id Number The bot id.
Source:
Returns:
The returned data.
Type
Promise

getBots() → {Promise}

Returns all bots on the site.
Source:
Returns:
The returned data.
Type
Promise

getCurrent() → {Promise}

Returns information about the current bot.
Source:
Returns:
The returned data.
Type
Promise

getStats() → {Promise}

Gets useful statistics aboutthe list.
Source:
Returns:
The returned data.
Type
Promise

getVotes() → {Promise}

Returns all votes for the current bot.
Source:
Returns:
The returned data.
Type
Promise

hasVoted24() → {Promise}

Check if a user has voted for the bot in the past 24 hours.
Source:
Returns:
The returned data.
Type
Promise

updateCount(count) → {Promise}

Posts server count to the website.
Parameters:
Name Type Description
count number | Array.<number> The server count, or array of server count as shards.
Source:
Returns:
The returned data.
Type
Promise