BLWebhooks, The Next Gen Vote Hooks!
Installation
Need Any Help Setting It Up? Join Our Support Server.
It's intended to be used with discord.js v12.
BLWebhooks fully supports external and discord.js internal sharding, make sure to enable the Upcoming Sharded Client Module.
NPM (recommended)
npm i blwebhooks --save
Yarn
yarn add blwebhooks
Supported Lists
top.gg
InfinityBotList
VoidBots
DiscordLabs
Botrix
Blist - Support Next Update
Usage
Import the lib via ES6 or commonJS modules
import * as blwebhooks from "blwebhooks";
const blwebhooks = require("blwebhooks");
With discord.js
const discord = require("discord.js");
const client = discord.Client();
const blwebhooks = require("blwebhooks");
const bl = new blwebhooks.Client(client, 80);
Turn On Sharding Support
bl.shardedClient(true);
Turn On Extended Security
bl.extraProtection(true);
Turn On Proxy Trust
bl.proxyTrust(true);
Emit Test Vote Events
bl.testVote(userID, botID);
Vote Hooks
TopGG Vote Hooks:
const topgg = bl.topggVoteHook(url, auth, true);
BLWEvent.on('topgg-voted', async function (UserID, botID, type) {
console.log(userID)
})
InfinityBotList Vote Hooks:
const InfinityBotList = bl.IBLVoteHook(url, auth, true);
BLWEvent.on('IBL-voted', async function (userID, botID, type, timeStamp) {
console.log(userID)
})
VoidBots Vote Hooks:
const VoidBots = bl.VoidBotsVoteHook(url, auth, true);
BLWEvent.on('VB-voted', async function (userID, botID) {
console.log(userID + " Voted For " + botID)
})
DiscordLabs Vote Hooks:
const DiscordLabs = bl.DiscordLabsVoteHook(url, auth, true);
BLWEvent.on('DL-voted', async function (userID, botID, wasTest) {
console.log(`${userID} Voted For ${botID}. Was Test: ${wasTest}`)
})
Botrix Vote Hooks:
const Botrix = bl.BotrixVoteHook(url, auth, true);
BLWEvent.on('BTR-voted', async function (userID, botID) {
console.log(`${userID} Voted For ${botID}.`)
})
Events
Global Voted Event
BLWEvent.on('vote', async function (userID, botID, List) {
console.log(`${userID} Voted For ${botID} on ${List}`)
})
Vote Expired Event
BLWEvent.on('vote-expired', async function (userID, botID, List) {
console.log(userID)
})
Error Event
BLWEvent.on('error', async function (error) {
console.log(userID)
})