pblapi.js
v1.11.5
Published
A library for integrating with The Central Bot List
Downloads
2
Readme
PBL-API.js
The official package for posting server count to PBL
Installation
Simply run npm install pblapi.js
Usage
Getting a bot:
const pbl = require('pblapi.js');
const PBL = new PBL.Client({
id: 'your-bot-id', key: 'your-bot-pbl-token'
});
PBL.getBot('some ID') //if you don't add ID it will take as default provided in preparing the client
.then(res => console.log(res.data))
.catch(err => console.log(err));
Getting a user:
const pbl = require('pblapi.js');
const PBL = new PBL.Client({
id: 'your-bot-id', key: 'your-bot-pbl-token'
});
PBL.getUser('some ID')
.then(res => console.log(res.data))
.catch(err => console.log(err));
Posting Bot Server Count:
const pbl = require('pblapi.js');
const PBL = new PBL.Client({
id: 'your-bot-id', key: 'your-bot-pbl-token'
});
PBL.postStats(44) //must be a number
.then(res => console.log(res.data))
.catch(err => console.log(err));