1.0.3 • Published 11 months ago

@yoshiboi18303/radarbots.js v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Radarbots.js

An unofficial package for interacting with the Radar Bot Directory API, rewritten to TypeScript.


Table of Contents

Features

Installation

Usage

License

Note


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 ❤️ (and TypeScript) by Yoshiboi18303.

1.0.3

11 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago