slothapi.js
v1.2.0
Published
The official TheLazySloth API wrapper written in Javascript.
Downloads
1
Maintainers
Readme
slothapi.js
The official TheLazySloth API wrapper written in Javascript.
Table Of Contents
How to Install
npm i slothapi.js
Documentation
example usage with client
const Discord = require("discord.js"),
client = new Discord.Client();
const SLOTHAPI = require("slothapi.js");
client.on("ready", () => {
sloth = new SLOTHAPI(client, "API Token", true, 60000);
sloth.on("post", (count) => console.log(`Posted guild count: ${count}`));
sloth.on("error", (error) => console.error(`An Error Has Occured: ` + JSON.stringify(error)));
});
client.login("token");
example usage without client
const SLOTHAPI = require("slothapi.js"),
// auto posting is not available with this
api = new SLOTHAPI("Your Bot Client ID","The Lazy Sloth API Token");
// see api methods for how to post guild counts