1.2.0 • Published 5 years ago

rdzapi.js v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Installation

Windows

  • npm i rdzapi.js

Linux

  • sudo npm i rdzapi.js

Usage

const { Client } = require("discord.js")
const bot = new Client();
const RDZ = require("rdzapi.js")
const rdz = new RDZ("Your Id Bot","Your token Bot")
let prefix = "!";


bot.on('ready', async () => {
console.log("Bot has started !")!
})

bot.on("message", async (message) => {
const msg = message.content.toLowerCase()
const args = message.content.slice(prefix.length).trim().split(/ +/g)
const command = args.shift().toLowerCase()

if (command === "rdz"){
const id = args[0]
if (!id) return message.reply("Provided some id bot")

try {
rdz.getBot(id).then(data => {
message.channel.send(`
Name: ${data.botName}
Owner : ${data.AuthorTag}
Prefix : ${data.prefix}
Approved : ${data.status}
`)
})
} catch (e) {
  message.channel.send('This bot is not registered in **RDZ DEV!**')
}
}

})

bot.login("Your bot token Discord")
1.2.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.6

5 years ago