This package has been deprecated
Author message:
Fabio kontol
farmcrafts.js
1.0.7 • Public • Published
npm install farmcrafts.js --save
sudo npm install farmcrafts.js --save
const FarmCrafts = require("farmcrafts.js");
const Discord = require('discord.js');
const bot = new Discord.Client()
const farm = new FarmCrafts("Your Bot ID", "Your ID");
const prefix = "!"
bot.on("ready", async () => {
console.log("Ready")
})
bot.on("message", async (message) => {
const msg = message.content.toLowerCase()
const args = message.content.slice(prefix.length).trim().split(/ +/g)
const cmd = args.shift().toLowerCase()
if (message.channel.type === 'dm') return;
if (!msg.startsWith(prefix)) return;
if (cmd === 'farmcrafts'){
const targetID = args[0]
if (!targetID) return message.channel.send("Berikan saya id bot yang valid")
if (targetID.length <= 17) return message.channel.send("Invalid bot id.")
const client = await farm.getBot(targetID);
if (client === undefined) return message.channel.send(`Unregistered bot..`)
message.channel.send(`Nama Bot : ${client.botName}\nPrefix bot : ${client.prefix}\nDeveloper Bot : ${client.ownerTag}`)
}
})
bot.login("Your Bot token goes here.")
/farmcrafts.js/
//
Package Sidebar
Install
Weekly Downloads