blackbotlistapi
v3.1.7
Published
API for https://blackbotlist.cf
Downloads
19
Maintainers
Readme
Black Botlist API
⚠️ THIS MODULE IS DEPRECATED / NOT IN USE ANYMORE!
It was created to connect to a blacklist.cf API to check if a bot has received a vote. Use it for educational/demo purposes only. It will no longer be maintained.
Info
Go to the Black Botlist website How to use Discord server Support Discord server
Usage
const blackbotlist = require("blackbotlistapi");
blackbotlist.get("Botid", "UserID").catch(() => {}).then(result => {
// You can change the result variable name
if (result) {
// If the user has voted
}
})
blackbotlist.get("Botid", "UserID").catch(() => {}).then(result => {
if (!result) {
// If the user has NOT voted
}
})
setInterval(function () {
blackbotlist.webhook("Botid").catch(() => {}).then(result => {
if (!result) return;
// If someone voted for the bot
console.log(result + " voted for the bot UwU");
})
}, 5000); // Change the interval if it's repeating or not doing anythingExample Code
const blackbotlist = require("blackbotlistapi");
// Vote command
client.on('message', async msg => {
if (msg.content === 'ping') {
blackbotlist.get("Botid", msg.author.id).catch(() => {}).then(result => {
if (!result) {
msg.channel.send("You need to vote to use this command.");
}
if (result) {
msg.channel.send("Thank you for voting!");
}
})
}
});
// Webhook
client.on('ready', () => {
setInterval(function () {
blackbotlist.webhook("Botid").catch(() => {}).then(result => {
if (!result) return;
client.channels.cache.get("ChannelID").send(`UwU <@!${result}> just voted for the bot!`);
})
}, 1000);
});
To install
npm i blackbotlistapi
Getting an error? First try this in your terminal:
npm i [email protected]
