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
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).
To post your bot's current guild count to Radarcord:
console.log(await radar.post());
// Success
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.
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
}
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": []
}
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": []
}
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.
For more detailed documentation, visit the Radarcord API Docs.
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.