2.5.2 • Published 4 years ago

dbh.js v2.5.2

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

Installation

$ npm i dbh.js -s

Usage

const Discord = require("discord.js");
const client = new Discord.Client();

const DBH = require("dbh.js");
const dbh = new DBH(client, "Api access token")

Add listener to your bot votes

client.dbh.on("voted", (user) => {
    /**
    * user returns: {
    *   user_name: "richaard5",
    *   user_discriminator: "7695",   
    *   user_id: "646416170123132959",      
    * }
    * **/
    console.log(`Thanks ${user.user_name}`)
})

How get api token access

Go to discord server, in commandschat and type !token <@YourBot>


Get bot from ID

client.dbh.getBot("657671268660936714").then(bot => {
    console.log(bot)
    /**
     * Bot Returns: {
     *    id: '657671268660936714',
     *    certified: false,
     *    tags: [ 'Moderation', 'Game', 'Fun', 'Web Dashboard' ],
     *    upvotes: 1,
     *    server: null,
     *    shortdescription: 'Meu super bot bem legal kkkk',
     *    library: 'Eris',
     *    ownerID: '646416170123132959',
     *    prefix: '-',
     *    github: null,
     *    invite: null,
     *    website: null
     *  }
     * **/
})

Get website bots

client.dbh.getBots(3).then(result => {
    // Max 250 Bots
    console.log(result.bots.length) // 3
    console.log(result)
    /**
     * Result return: {
     *   bots: [Bot...]
     * }
    */
})
2.5.2

4 years ago

2.5.0

4 years ago

0.5.0

4 years ago