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

1.0.3 • Public • Published

BOD-API

Easily use the Bots OF Discord API from your Discord Bot bots!

Examples

// Create the client
const { Client } = require("b0d-api");
const dboats = new Client(
  "api key"
);
 
// Get stats about the list
await dboats.stats(); // Returns an object of stats
 
// Get information about the current bot user
await dboats.me(); // Returns an object of information about the current bot
 
// Get information about a specific bot
await dboats.botInfo("bot id"); // Returns general information about the requested bot
 
// Gets if a user has liked the bot on discordboats.club
await dboats.botLiked("user id"); // Returns the timestamp of when they voted if they have, otherwise false
 
// Post servers to discordboats.club
await dboats.postServers(100); // Returns true if it posts successfully
 
// Get information about a specific user
await dboats.userInfo("user id"); // Returns an object of user information

Webhook

const { Webhook } = require("dboats-api");
const webhookServer = new Webhook({
  port: 1234, // required
  auth: "password in dboats", // required
  path: "/webhook" // optional path for the webhook, defaults to /
});
 
webhookServer.on("like", (botId, userId) => {}); // create an event to handle when your bot is liked
 
webhookServer.on("unlike", (botId, userId) => {}); // create an event to handle when your bot is unliked
 
webhookServer.start(); // start the server

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    0
  • 1.0.2
    0

Package Sidebar

Install

npm i bod--api

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

27.4 kB

Total Files

8

Last publish

Collaborators

  • botsofdiscord12