hestibots.js
v1.0.5
Published
The official HestiBots API wrapper for NodeJS
Downloads
1
Readme
HestiBots.js
The official HestiBots API wrapper for Node.js
Installation
Simply run npm i hestibots.js
Usage
Posting Bot Server Count:
const HestiClient = require('hestibots.js');
const Hesti = new HestiClient('API Key');
Hesti.postStats('Bot ID', SERVER_COUNT, USER_COUNT).then((post) => {
console.log(post);
}).catch(err => {
console.error(err);
});
Getting Bot Info:
const HestiClient = require('hestibots.js');
const Hesti = new HestiClient('API Key');
Hesti.getBot('Bot ID').then((bot) => {
console.log(bot);
}).catch(err => {
console.error(err);
});
Getting User Info:
const HestiClient = require('hestibots.js');
const Hesti = new HestiClient('API Key');
Hesti.getUser('User ID').then((user) => {
console.log(user);
}).catch(err => {
console.error(err);
});
Checking if a user voted your bot:
const HestiClient = require('hestibots.js');
const Hesti = new HestiClient('API Key');
Hesti.getVoted('Bot ID', 'User ID').then((voted) => {
console.log(voted);
}).catch(err => {
console.error(err);
});