An API Wrapper For DR Development (still under development)
Example With Async/Await
const Discord = require('discord.js');
const client = new Discord.Client();
const DRDev = require("drapi.js");
const DR = new DRDev("your bot id", "your user id")
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', async msg => {
var PREFIX = "!";
if (msg.author.bot) return;
if (!msg.content.startsWith(PREFIX));
let args = message.content.slice(PREFIX.length).trim().split(" ");
let command = args.shift().toLowerCase();
if (command === "dr") {
if (!args[0]) return msg.channel.send("Please Provide a Bot ID");
let result = await DR.getBot(args[0]);
if (!result) return msg.channel.send("Sorry, maybe the bot isn't registered in DR Development");
msg.channel.send(`**${result.bot.tag}** owned by **${result.owner.tag}** with prefix **${result.prefix}**`);
return;
};
});
client.login('token');