radarcord.js

1.1.6 • Public • Published

radarcord.js

The official API wrapper for interacting with the Radarcord botlist platform.

Installation To install the radarcord.js package, run the following command:

npm install radarcord.js

Importing

To use radarcord.js, import it into your project:

const rjs = require('radarcord.js');

Create a new instance of the Radarcord wrapper:

const radar = new rjs.set(<client>, "TOKEN");
<client>: The Discord client (your bot's client).
"TOKEN": Your Radarcord API token (available through your Radarcord account).

API Usage

Post Guild Stats

To post your bot's current guild count to Radarcord:

console.log(await radar.post());  
// Success

Post Commands

To set and post your bot’s commands to Radarcord, format the commands as an array of objects:

const commands = [{
    name: "help",
    description: "Displays help embed"
}];

console.log(await radar.setCommands(commands));  
// Success
commands: An array containing your bot's commands, with each command having a name and description.

Get Bot Information

To fetch detailed information about your bot by its ID:

const info = await radar.getBot("BOT_ID");  
This will return an object with various bot details:
{
    "longdescription": "",
    "shortdescription": "",
    "prefix": "",
    "category": [],
    "ownerid": "",
    "id": "",
    "name": "",
    "votes": 0,
    "website": "",
    "guilds": 0,
    "verified": true/false
}

Get User Information

To get information about a user by their ID:

const user = await radar.getUser("USER_ID");
This will return the user's details:
{
    "username": "scorprian",
    "id": "381710555096023061",
    "bots": []
}

Get Bot Reviews

To get reviews for a bot by its ID:

const reviews = await radar.getReviews("BOT_ID");
The response will contain an array of reviews:
{
    "reviews": []
}

Send Uptime Ping

To ping the Radarcord server and update your bot's uptime:

await radar.uptimePing();
This will send an uptime ping to keep your bot's status active on the platform.

Documentation

For more detailed documentation, visit the Radarcord API Docs.

Additional Notes:

Make sure to keep your API token secure. Never expose it in public repositories.
Ensure your bot is correctly listed on Radarcord for accurate data submission.

Readme

Keywords

none

Package Sidebar

Install

npm i radarcord.js

Weekly Downloads

2

Version

1.1.6

License

ISC

Unpacked Size

5.95 kB

Total Files

3

Last publish

Collaborators

  • scorpacula
  • yoshiboi18303
  • knox3039