discordboats
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

NPM

DiscordBoats

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

Installation

  # NPM
  npm install discordboats

  # Yarn
  yarn add discordboats

Usage

Post your Bot's Server Count

const { Boat } = require("discordboats");
const boat = new Boat();

boat.on("Ready", () => {

    console.log("Ready");

    boat.postServers("1234", 23);
});

boat.on("Posted", amount => {

    console.log("Server count posted - " + number);
});

boat.login("Your Api Token");

Fetch a user info

const { Boat } = require("discordboats");
const boat = new Boat();

/*boat.users.fetchUser("User id").then(x => {

    console.log(`Name: ${x.name}`);
});*/

const user = await boat.users.fetchUser("User id");

console.log(`Name: ${user.name}`);

Fetch a bot info

const { Boat } = require("discordboats");
const boat = new Boat();

/*boat.users.fetchBot("Bot id").then(x => {

    console.log(`Name: ${x.name}`);
});*/

const bot = await boat.users.fetchBot("Bot id");

console.log(`Name: ${bot.name}`);

Check if a user has voted your bot

const { Boat } = require("discordboats");
const boat = new Boat();

/*boat.users.isVoted("Your Bot ID", "User ID").then(x => {

    console.log(x); // Return true or false
});*/

const voted = await boat.users.isVoted("Your Bot Id", "User ID");

console.log(voted); // Retrun true of false

License

Package is licensed under MIT

Package Sidebar

Install

npm i discordboats

Weekly Downloads

6

Version

1.1.0

License

MIT

Unpacked Size

28.5 kB

Total Files

22

Last publish

Collaborators

  • avaxwzy