bloblist v1.0.1
Example Usage:
const Discord = require("discord.js"); //This is an example voted check command const client = new Discord.Client(); const bloblist = require("bloblist");
const log = new bloblist("token", client); // This is not your bot token, this token can be found from our website
client.on("ready", async () => {
console.log(Logged in as ${client.user.tag}
)
})
client.on("message", async (message) => {
if (!message.guild) return;
if (message.author.bot) return;
const prefix = "!";
const args = message.content.slice(prefix.length).split(" ");
const command = args.shift().toLowerCase();
if (command === "check") {
const vote = await dbl.hasVoted(message.author.id);
if (vote === true) { // checking whether the author has voted or not!
message.channel.send(You have voted for ${client.user.tag} recently. You can vote every 12 hours.
)
} else {
message.channel.send(You have not voted for ${client.user.tag}. Please vote :)\nhttps://bloblist.shamdev.xyz/bots/${client.user.id}/vote
)
}
}})
client.login("token")
let hasVote = await log.hasVoted("USER ID");
if(hasVote === true) {
console.log("Voted")
} else {
console.log("Vote please.")
}
{
"voted": "true/false" // this is the method of getting informations from the api
}