voodoobots.js

3.0.2 • Public • Published

Installation

npm i voodoobots.js --save
yarn add voodoobots.js

Usage

const voodoobots = require('./voodoobots.index');
const dbl = new voodoobots("voodoobots Bot Token");


dbl.on("ready", (bot) => {
    console.log(`Bot named ${bot.username} successfully finded on Voodoobots.`)
    dbl.checkVote("714451348212678658").then(value => console.log("Vote Control: "+ value))

    /*
        let guildCount = 1234;
        let shardCount = 5;
        dbl.stats(guildCount, shardCount, () => console.log("Stats updated on voodoobots."));
    */
})


/*
    Get with Bot: 
    dbl.on("vote", ({ user, bot }) => {
        console.log(`${user.username} voted ${bot.username}`)
    })
*/
dbl.on("vote", ({ user }) => {
    console.log(`${user.username} voted.`)
})

Detailed

Define Module

const voodoobots = require('./voodoobots.index');
const dbl = new voodoobots("voodoobots Bot Token");

Let's add an event to see if it works.

dbl.on("ready", (bot) => {
    console.log(`Bot named ${bot.username} successfully finded on Voodoobots.`)
})

// => Bot named Allegro successfully finded on Voodoobots.

Let's update bot data

dbl.on("ready", (bot) => {
    console.log(`Bot named ${bot.username} successfully finded on Voodoobots.`)
    let guildCount = 1234;
    let shardCount = 5;
    dbl.stats(guildCount, shardCount, () => console.log("Stats updated on Voodoobots."));
})

// => Bot named Allegro successfully finded on Voodoobots.
// => Stats updated on Voodoobots.

Let's check if a user has voted.

dbl.on("ready", (bot) => {
    console.log(`Bot named ${bot.username} successfully finded on Voodoobots.`)
    dbl.checkVote("714451348212678658").then(value => console.log("Vote Control: "+ value))

    /*
        let guildCount = 1234;
        let shardCount = 5;
        dbl.stats(guildCount, shardCount, () => console.log("Stats updated on Voodoobots."));
    */
})

// => Bot named Allegro successfully finded on Voodoobots.
// => Vote Control: false

Let's check if there is a user who voted for our bot instantly.

dbl.on("vote", ({ user }) => {
    console.log(`${user.username} voted.`)
})

// => clqu voted.
// WITH BOT
dbl.on("vote", ({ user, bot }) => {
    console.log(`${user.username} voted ${bot.username}`)
})

// => clqu voted Allegro.

Developed with ❤️ by Voodoobots

Readme

Keywords

Package Sidebar

Install

npm i voodoobots.js

Weekly Downloads

1

Version

3.0.2

License

Apache-2.0

Unpacked Size

6.17 kB

Total Files

5

Last publish

Collaborators

  • glitched_king