Vote Check

By this method of Vote Check, your bot can check whether the author have or have not voted for your bot.

An Example Command

const Discord = require("discord.js"); //This is an example voted check command
const client = new Discord.Client();
const bhbotlist = require("bhbotlist.js");
const dbl = new bhbotlist("TOKEN-HERE", 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 ( return;
  const prefix = "!";
  const args = message.content.slice(prefix.length).split(" ");
  const command = args.shift().toLowerCase();
  if (command === "check") {
    const vote = await dbl.hasVoted(;
    if (vote === true) { // checking whether the author has voted or not!`You have voted for ${client.user.tag} recently. You can vote every 12 hours.`)
    } else {`You have not voted for ${client.user.tag}. Please vote :)\n${}/vote`)

let hasVote = await dbl.hasVoted("USER ID");

if(hasVote === true) {


} else {

  console.log("Vote please.")

{ // this is the method of getting informations from the api

  "voted": "true/false"


Last updated