![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
blwebhooks
Advanced tools
Webhook Vote Reciever For Lists Such As top.gg, InfinityBotList and Many More To Come!
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 Sharded Client Option.
Please do remember this is in beta, before writing a negative review please open a issue first so we can have a chance to resolve the issue.
# Stable
npm i --save blwebhooks
# Nightly Builds
npm i --save blwebhooks@nightly
# Stable
yarn add blwebhooks
# Nightly Builds
yarn add blwebhooks@nightly
Name | Features |
---|---|
discord.js | DATABASE , EXPRESS , HOOKS , SECURITY |
Eris | EXPRESS , HOOKS , SECURITY |
Name | Features | UserID | BotID | userName | Event Name |
---|---|---|---|---|---|
top.gg | DATABASE , HOOKS | true | true | false | topgg-voted |
InfinityBotList | DATABASE , HOOKS | true | true | false | IBL-voted |
VoidBots | DATABASE , HOOKS | true | true | false | VB-voted |
DiscordLabs | DATABASE , HOOKS | true | true | false | DL-voted |
Blist | DATABASE , HOOKS | true | true | false | BLT-voted |
DiscordBots.co | DATABASE , HOOKS | true | true | false | DBC-voted |
ParadiseBotList | DATABASE , HOOKS | true | true | true | PBL-voted |
Name | Features | ETA |
---|---|---|
Botrix | DATABASE , HOOKS | N/A |
// ES6
import * as blwebhooks from "blwebhooks";
// or commonJS
const blwebhooks = require("blwebhooks");
const discord = require("discord.js");
const client = discord.Client();
const { WebhooksManager } = require("blwebhooks");
const voteClient = new WebhooksManager(client, 80, {
database: "none", // mongoose or sqlite
string: "MongooseURL", // Only Use This If The Database Is Set To Mongoose
extra: {
extraLogging: false, // This will enable extraLogging {Debugging}
extraProtection: true, // Leave Enabled Unless Using Small Amount Of RAM
proxyTrust: false, // Enable this if your behind a proxy, Heroku,
},
});
client.voteManager = voteClient;
const Eris = require("eris");
var bot = new Eris("BOT_TOKEN");
// Replace BOT_TOKEN with your bot account's token
bot.on("ready", () => {
// When the bot is ready
console.log("Ready!"); // Log "Ready!"
});
const { WebhooksManager } = require("blwebhooks");
const voteClient = new WebhooksManager(bot, 80, {
database: "none", // mongoose or sqlite
string: "MongooseURL", // Only Use This If The Database Is Set To Mongoose
extra: {
extraLogging: false, // This will enable extraLogging {Debugging}
extraProtection: true, // Leave Enabled Unless Using Small Amount Of RAM
proxyTrust: false, // Enable this if your behind a proxy, Heroku,
},
});
bot.voteManager = voteClient;
bot.connect(); // Get the bot to connect to Discord
// Set the vote storage in the voteClient
const voteClient = new WebhooksManager(client, 80, {
database: "mongoose", // mongoose or sqlite
string: "mongooseDB-URL",
extra: {
extraLogging: false,
extraProtection: true,
proxyTrust: false,
},
});
For usage on pulling data see the Database Vote Section.
// You can enable this via the voteClient
const voteClient = new WebhooksManager(client, 80, {
database: "mongoose",
string: "mongooseDB-URL",
extra: {
extraLogging: false,
extraProtection: true, // Enable this here
proxyTrust: false,
},
});
// Enable this in the voteClient
const voteClient = new WebhooksManager(client, 80, {
database: "mongoose",
string: "mongooseDB-URL",
extra: {
extraLogging: false,
extraProtection: true,
proxyTrust: true, // Enable it here
},
});
// Emit a test event to test your Voted Event
voteClient.testVote(userID, botID);
TopGG Vote Hooks:
// This will listen to votes from top.gg, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.topggVoteHook(url, auth, true);
// This code will run after a new vote was received from top.gg
client.on("topgg-voted", async function (userID, botID, type) {
console.log(userID);
});
InfinityBotList Vote Hooks:
// This will listen to votes from InfinityBotList, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.IBLVoteHook(url, auth, true);
// This code will run after a new vote was received from InfinityBotList
client.on("IBL-voted", async function (userID, botID, type) {
console.log(userID);
});
VoidBots Vote Hooks:
// This will listen to votes from VoidBots, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.VoidBotsVoteHook(url, auth, true);
// This code will run after a new vote was received from VoidBots
client.on("VB-voted", async function (userID, botID) {
console.log(userID + " Voted For " + botID);
});
DiscordLabs Vote Hooks:
// This will listen to votes from DiscordLabs, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.DiscordLabsVoteHook(url, auth, true);
// This code will run after a new vote was received from DiscordLabs
client.on("DL-voted", async function (userID, botID, wasTest) {
console.log(`${userID} Voted For ${botID}. Was Test: ${wasTest}`);
});
Botrix Vote Hooks:
// This will listen to votes from Botrix, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.BotrixVoteHook(url, auth, true);
// This code will run after a new vote was received from Botrix
client.on("BTR-voted", async function (userID, botID) {
console.log(`${userID} Voted For ${botID}.`);
});
BList Vote Hooks:
// This will listen to votes from BList, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.BListVoteHook(url, auth, true);
// This code will run after a new vote was received from BList
client.on("BLT-voted", async function (userID, botID) {
console.log(`${userID} Voted.`);
});
DiscordBots.co Vote Hooks:
// This will listen to votes from BList, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.DBCVoteHook(url, auth, true);
// This code will run after a new vote was received from BList
client.on("DBC-voted", async function (userID, botID) {
console.log(`${userID} Voted.`);
});
ParadiseBotList Vote Hooks:
// This will listen to votes from BList, the url is the end not
// including the / and auth is the webhook auth. You can enable and
// disable using true or false at the end
client.voteManager.PBLVoteHook(url, auth, true);
// This code will run after a new vote was received from BList
client.on("PBL-voted", async function (userID, botID, userName) {
console.log(`${userName} (${userID}) Voted For <#${botID}>`);
});
Global Voted Event
// This will run after any vote has been received, use this if you don't want seprate events for each list
client.on("vote", async function (userID, botID, List) {
console.log(`${userID} Voted For ${botID} on ${List}`);
});
Vote Expired Event
// This will run after the vote expires, this will be different for each list
client.on("vote-expired", async function (userID, botID, List) {
console.log(userID);
});
Error Event
// This code will run in the event of a error, normally it will just console.log the error but you can add custom error events here
client.on("webhookError", async function (error) {
console.log(userID);
});
The vote Database feature will save the total votes a User had made for your bot / server, it will add all the vote in a database and the methods below show you how to set it up and pull data.
discord.js example
// The DB can be set to either mongo, sqlite
// Only set the string if using the mongoose db
voteClient.setStroage(DB, String);
// MongooseDB Example (recommended)
voteClient.setStroage("mongo", "mongodb://localhost/my_database");
// SQLITE Example
voteClient.setStroage("sqlite");
Pulling User Votes
voteClient.getVotes(userID, option);
Options:
daily
- Get Daily Votesweekly
- Get Weekly Votesmonthly
- Get Monthly VotesFAQs
Webhook Vote Reciever For Lists Such As top.gg, InfinityBotList and Many More To Come!
The npm package blwebhooks receives a total of 194 weekly downloads. As such, blwebhooks popularity was classified as not popular.
We found that blwebhooks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.