A library for interacting with the Planetdbl.xyz API.
You can install planetdbl.js
using npm:
npm install planetdbl.js
To use planetdbl.js in your project, follow these steps:
Install the library:
npm install planetdbl.js
Require in your main file:
const { Planetdbl } = require('planetdbl.js');
const planetdbl = new Planetdbl();
planetdbl.setup({
botToken: 'YOUR_DBL_BOT_TOKEN', //Your dbl token.
guildCount: 1000,
shardCount: 1,
errorType: 'console', // or 'message'
messageHandler: yourCustomMessageHandlerFunction // optional, Remove it If you dont want!
});
// Example: Update bot stats
planetdbl.updateBotStats();
// Example: Check if a user has voted
const voted = await planetdbl.checkVote('USER_ID');
console.log('Has voted:', voted);
botToken
: Your planetdbl.xyz dbl token.
guildCount
: The number of guilds your bot is in.
shardCount
: The number of shards your bot has.
errorType
: Type of error handling ('console' or 'message').
messageHandler
: Custom function to handle error messages (optional).
updateBotStats()
: Updates bot statistics.
checkVote(userID)
: Checks if a user has voted.
getBotInfo(botID)
: Gets information about a bot.
searchServer(key)
: Searches for servers.
searchBot(key)
: Searches for bots.