infinity-api
Table Of Contents
Installation
NPM
npm install --save ibl-api
Yarn
yarn install ibl-api
Usage:
Posting:
const discord = require('discord.js');
const client = new discord.Client();
const { IBL } = require('ibl-api');
const ibl = new IBL(client, 'botAuth');
ibl.postStats()
ibl.autopost(60 * 60 * 1000)
client.login('token');
Vote Webhooks:
const { IBL } = require('ibl-api');
const discord = require('discord.js');
const client = new discord.Client();
const ibl = new IBL(client, 'botAuth');
ibl.voteWebhook(
'web auth',
3001,
'/ibl/webhook'
)
ibl.webhook.on("ready", port => {
console.log(`Infinity Bot List webhook is listening on ${port}`)
});
ibl.webhook.on("vote", async (user, bot, type) => {
console.log(`${user} voted for ${bot}`);
});
client.login('token');