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

bfd-api-redux

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfd-api-redux

A node.js wrapper for the Bots For Discord API

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

NOTICE & INFO

bfd-api-redux is an official bot-page API wrapper for Discords.com (formerly botsfordiscord.com). Please direct all inqueries and support requests to our support server.

Usage

Constructing a new API interface:

var bfd = require('bfd-api-redux');
var api = new bfd('BFD_Token', 'botID');

NOTE: Everything has to be used inside async functions with an await, for example:

async function user() {
    console.log(await api.getUser('254287885585350666'));
}
user();

All of the following functions only require id, which is the ID of the bot/user that is being searched and return a JSON object when done:

api.getUser('254287885585350666') //requires user ID
api.getUserBots('254287885585350666') //requires user ID
api.getBot('621352902656524288') //requires bot ID
api.getWidget('621352902656524288') //requires bot ID

api.getVotes() //Automatically gets your votes, no input required

You can easily update your Bot's guild count using this function:

let serverCount = client.guilds.cache.size; 
api.setServers(serverCount)

Examples

Get votes

With callback

api.getVotes().then(votes => {
    console.log(votes)
})

Without callback

async function votes() {
    console.log(await api.getVotes());
}
votes();

Keywords

FAQs

Package last updated on 14 Nov 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