Skip to content

AvaxWzy/discordboats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published