danbot-hosting

0.1.6 • Public • Published

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)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.6
    83
    • latest

Version History

Package Sidebar

Install

npm i danbot-hosting

Weekly Downloads

83

Version

0.1.6

License

MIT

Unpacked Size

13.7 kB

Total Files

5

Last publish

Collaborators

  • teacup99
  • danielpmc