3.0.1 • Published 4 years ago
hbcapi.js v3.0.1
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 page
Methods
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)
})