rendapi.js v0.3.2
rendapi.js
An API Wrapper For RendDevelopment
Example With Async/Await
const Discord = require('discord.js'); const client = new Discord.Client(); const RendDev = require("rendapi.js"); const rend = new RendDev("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 === "rend") {
if (!args0) return msg.channel.send("Please Provide a Bot ID");
let result = await rend.getBot(args0);
if (!result) return msg.channel.send("Sorry, maybe the bot isn't registered in RendDevelopment");
msg.channel.send(**${result.bot.tag}** owned by **${result.owner.tag}** with prefix **${result.prefix}**
);
return;
};
});
client.login('token');
[Link to Discord Server](https://discord.gg/c5dMfsF)