Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
I want to add a vote cooldown

I want to add vote cooldown in this command. It can check whether user voted or not

const url = `https://top.gg/api/bots/${botId}/check?userId=${uId}`; // api endpoint

fetch(url, { method: "GET", headers: { Authorization: process.env.TOPGG }})
  .then((res) => res.text())
  .then((json) => {
    var isVoted = JSON.parse(json).voted;

    if (isVoted === 0) {
      
    
 message.channel.send("not voted");
    } else if (isVoted === 1) {


message.channel.send("voted");
    }
    const embed = new Discord.MessageEmbed()
        embed stuff...)
        message.channel.send(embed);

  });
 },
};
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!