2.5.3 • Published 4 years ago

boats.js v2.5.3

Weekly downloads
479
License
MIT
Repository
github
Last release
4 years ago

NPM

Boats.js

The official https://discord.boats API wrapper for Node.js

Installation

Simply run npm i boats.js (or yarn add boats.js)

Usage

Posting Bot Server Count:

const BoatsClient = require('boats.js');
const Boats = new BoatsClient('API TOKEN', 'API VERSION (optional, either "v1" or "v2")');

Boats.postStats(SERVER_COUNT, 'BOT_ID').then(() => {
    console.log('Successfully updated server count.');
}).catch(err => {
    console.error(err);
});

Getting Bot Info:

const BoatsClient = require('boats.js');
const Boats = new BoatsClient('API TOKEN');

Boats.getBot('BOT_ID').then(bot => {
    console.log(bot);
}).catch(err => {
    console.error(err);
});

Getting User Info:

const BoatsClient = require('boats.js');
const Boats = new BoatsClient();

Boats.getUser('USER_ID').then(user => {
    console.log(user);
}).catch(err => {
    console.error(err);
});

Checking if a user voted your bot:

const BoatsClient = require('boats.js');
const Boats = new BoatsClient('API TOKEN');

Boats.getVoted('BOT_ID', 'USER_ID').then(voted => {
    console.log(voted);
}).catch(err => {
    console.error(err);
});

License

MIT

2.5.2

4 years ago

2.5.3

4 years ago

2.5.1

4 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.0

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago