0.0.17 • Published 2 years ago
radarbots.js v0.0.17
Radarbots.js
An unofficial package used to interact with the Radar Bot Directory API
Warning
You will need to have your bot listed on the Radar Bot Directory for all the functions to work, otherwise you're going to get some errors.
Developer
This package was developed by Yoshiboi18303
Usage
Server Stats Post
const Discord = require("discord.js");
const Radar = require("radarbots.js");
const client = new Discord.Client({
intents: Object.values(Discord.Intents.FLAGS),
});
const radar = new Radar(client, "Your Radar Bot Directory Token");
client.on("ready", async () => {
console.log("The client is ready!");
console.log(await radar.stats(client.guilds.cache.size));
});
client.login("Your token goes here");
Bot Widget
console.log(await radar.botWidget());
Autoposting Stats
const Discord = require("discord.js");
const Radar = require("radarbots.js");
const client = new Discord.Client({
intents: Object.values(Discord.Intents.FLAGS),
});
const radar = new Radar(client, "Your Radar Bot Directory Token");
client.on("ready", async () => {
console.log("The client is ready!");
console.log(await radar.stats(client.guilds.cache.size, 1, true));
});
client.login("Your token goes here");
Note
This package could be really buggy (as I'm shitty at JS), so any bug reports would be appreciated.