The Discord Bots

API


Posting guild count and shard count automatically (Supported Libraries: Discord.JS & Eris) POST

const Discord   = require("discord.js"),
      client    = new Discord.Client(),
      TDBotsAPI = require('tdbapi.js'),
      TDBots    = new TDBotsAPI('ur token', client);

// Events
TDBots.on('error', console.error)
TDBots.on('post', () => console.log("Guild & shard count posted."))

Posting guild count and shard count manually POST

const Discord   = require("discord.js"),
      client    = new Discord.Client(),
      TDBotsAPI = require('tdbapi.js'),
      TDBots    = new TDBotsAPI('ur token');

// Events
TDBots.on('error', console.error)
TDBots.on('post', () => console.log("Guild & shard count posted."))

// Posting
client.on('ready', async() => {
  setInterval(() => {
    TDBots.post(client.guilds.cache.size, client.shard.count)
  }, 900000);
})

Checking if the user has voted GET

const Discord   = require("discord.js"),
      client    = new Discord.Client(),
      TDBotsAPI = require('tdbapi.js'),
      TDBots    = new TDBotsAPI('ur token', client);

// Events
TDBots.on('error', console.error)
TDBots.on('post', () => console.log("Guild & shard count posted."))

client.on('message', async(msg) => {
  const check = await TDBots.voted(msg.author.id)
  if (check) {
    // if voted
  } else {
    // else
  }
})

Get the information of a bot GET

const Discord   = require("discord.js"),
      client    = new Discord.Client(),
      TDBotsAPI = require('tdbapi.js'),
      TDBots    = new TDBotsAPI('ur token', client);

// Events
TDBots.on('error', console.error)
TDBots.on('post', () => console.log("Guild & shard count posted."))

client.on('ready', async() => {
  const botInformation = await TDBots.fetchBot("511970030502805521")
  console.log(botInformation) // { owners: [...], prefix: "...", ... }
  return
})



DMCA.com Protection Status