abl.js

1.0.0 • Public • Published

Astro Bot List API Wrapper v2

Currently, you can post and get your bot stats.

const Botlists = require('abl.js');

const abl = new Botlists('1234');

/* get your bot stats */

abl.stats().then((r) => console.log(r.message)).catch((r) => console.log(r));

/* post your bot stats */

abl.postStats(10, 2).then((r) => console.log(r)).catch((r) => console.log(r));


/*
    First param is the servers
    second param is the shards
*/
Using async/await
    const Botlists = require('abl.js');
    
    const abl = new Botlists('api key');
    (async () => {
      try {
        const botStats = await abl.stats();
        console.log(botStats);
      } catch (e) {
        console.log(e);
      }
    
      try {
        const postStats = await abl.postStats(10, 2);
        console.log(postStats, 'here');
      } catch (e) {
        console.log(e);
      }
    })();
   

Package Sidebar

Install

npm i abl.js

Weekly Downloads

1

Version

1.0.0

License

Apache-2.0

Unpacked Size

14 kB

Total Files

5

Last publish

Collaborators

  • terrible_dev