1.0.7 • Published 5 years ago
farmcrafts.js v1.0.7
Installation
Windows
npm install farmcrafts.js --save
Linux
sudo npm install farmcrafts.js --save
Usage
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.")
Created by ~hanspro
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5-universal
5 years ago
1.0.5-beta
5 years ago
1.0.5
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago