Skip to content

WhiteClueGaming/discord-bots-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

discord-bots-api

-https://dbots.ml/ -You can report about the api!

Npm Package

#FAQ

  • Where to get API token

You will get the api token in your bots edit page!

Stats Posting

const dbots = require("discord.dbl");
const dbl = new dbots("API-TOKEN-HERE", client);

client.on("ready", async () => {
  dbl.postStats(); => Note: You can only use this package for discord.js use
  // console.log("Server count posted")
  })

//Able to post both server & shards count.....

Or

//Direct Method

require("node-fetch")(`https://dbots.ml/api/bots/stats`, {
        method: 'POST',
        headers: { 
          'serverCount': 1, //If you want to post shards count add 'shardCount': 3, below the server count!
          'Content-Type': 'application/json', 
          'Authorization': api token
        },
    })
    .then(console.log("Server count posted."));
  }

Has Voted

const dbots = require("discord.dbl");
const dbl = new dbots("API-TOKEN-HERE", client);

client.on("ready", async () => {
  
let hasVote = await dbl.hasVoted("BOT-ID");
  if(hasVote === true) {
    console.log("Voted")
  } else {
    console.log("Vote please.")
  }
  
});

Search For Bots

const dbots = require("discord.dbl");
const dbl = new dbots("API-TOKEN-HERE", client);

client.on("ready", async () => {
  
  let search = await dbl.search("BOT-ID")
  console.log(search)
  
});

About

You can report about the api!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors