elcorlist.js

1.0.0 • Public • Published

npm install
Do you need my help? Visit our Discord server.

Installation

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

Usage

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


dbl.on("ready", (bot) => {
    console.log(`Bot named ${bot.username} successfully finded on vCodes.`)
    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 vCodes."));
    */
})


/*
    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 vCodes = require('./vcodes.index');
const dbl = new vCodes("vCodes 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 vCodes.`)
})

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

Let's update bot data

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

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

Let's check if a user has voted.

dbl.on("ready", (bot) => {
    console.log(`Bot named ${bot.username} successfully finded on vCodes.`)
    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 vCodes."));
    */
})

// => Bot named Allegro successfully finded on vCodes.
// => 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 Void Development

Readme

Keywords

Package Sidebar

Install

npm i elcorlist.js

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Unpacked Size

6.13 kB

Total Files

7

Last publish

Collaborators

  • samuelblox