hbcapi.js
v3.0.1
Published
The official server count wrapper for hydrogenbots.club
Maintainers
Readme
hbcapi
Description
This is the official api wrapper for hydrogenbots.club
importing and defining
import
npm install hbcapi
define the library in your code
const HBC = require("hbcapi.js")
const hbc = new HBC.HBC(Authorization)//Authorization: The authorization code obtainable in your bot's pageMethods
poststats
post the servercount for your bot
hbc.servercount({ shard: number, guild: number }, function(result){//guild: the guild count, shard: the shard count. False guildcount will lead to bot deletion
console.log(result)//if you want to use JSON.parse, use try & catch to prevent json convertion errors
})voters
get an array of all of the voters that have voted for your bot
hbc.voters(function(result){
console.log(result)
})