Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

boats.js

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boats.js

The official discord.boats API wrapper for Node.js

  • 2.5.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by46.67%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 17 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc