0.1.6 • Published 4 years ago

danbot-hosting v0.1.6

Weekly downloads
8,317
License
MIT
Repository
github
Last release
4 years ago

DanBotHosting API Wrapper

How to get API Key

  • join our Discord (link above)
  • go into our #bot-commands channel
  • type DBH!ApiKey and you'll get an API Key!

Examples

Most Needs async:

Creating Client: no-sharding

const Discord = require("discord.js");
let client = new Discord.Client();

var DanBotHosting = require("danbot-hosting");

client.on("ready", async () => {
  console.log("bot is now ready");
  const API = new DanBotHosting.Client("danbot-KEY", client);

  // Start posting
  let initalPost = await API.autopost();

  if (initalPost) {
    console.error(initalPost); // console the error
  }
});

sharding

const Discord = require("discord.js");
let client = new Discord.Client();

var DanBotHosting = require("danbot-hosting");
const manager = new Discord.ShardingManager("./bot.js", { token: "TOKEN" });
const API = new DanBotHosting.ShardingClient("danbot-KEY", manager);

get bot info

  • only for the client you are logged in as
 let res = await API.botInfo()
 console.log(res)
0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago