An official module for interacting with the voidbots.net API
npm install voidbots
Documentation can be found here
const Discord = require("discord.js");
const client = new Discord.Client();
const VoidBotsClient = require("voidbots");
const voidbots = new VoidBotsClient('Your voidbots.net token', { autoPost: true, webhookEnabled: true }, client);
// Optional events
voidbots.on('posted', () => {
console.log('Server count posted!');
})
voidbots.on('error', e => {
console.log(`Oops! ${e}`);
})
voidbots.on('voted', data => {
console.log(`${data.user} has voted for ${data.bot}`)
})