Radarbots.js
An unofficial package for interacting with the Radar Bot Directory API, rewritten to TypeScript.
Table of Contents
Features
-
Actual TypeScript support (not provided in the old package).
-
Support for the new site URL (located here).
-
Autoposting stats supported (not provided in the old package).
Installation
NPM:
npm install @yoshiboi18303/radarbots.js
Yarn:
yarn add @yoshiboi18303/radarbots.js
PNPM:
pnpm install @yoshiboi18303/radarbots.js
Usage
import Discord from "discord.js";
import Radar from "@yoshiboi18303/radarbots.js";
const client = new Discord.Client({
intents: new Discord.IntentsBitField(["Guilds"]),
});
const radar = new Radar(client, "your token goes here");
client.on("ready", async () => {
console.log("The client is ready!");
// Post stats to the API
await radar.postStats().catch(console.error);
});
// Login to Discord
client.login("your bot token");
More examples in the examples
License
This package is licensed with the MIT License.
Note
This is my first attempt at TypeScript support, so don't expect perfection, if you find any issues, please open and issue and/or let me know.
Made with