radarcord.js
v1.2.1
Published
Official NPM Package for Radarcord.net
Readme
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.jsImporting
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:
await radar.post([0, 0] or 0);
// SuccessPost 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"
}];
await radar.setCommands(commands);
// SuccessGet 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.
