This package has been deprecated

Author message:

Fabio kontol

farmcrafts.js

1.0.7 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i farmcrafts.js

Weekly Downloads

0

Version

1.0.7

License

ISC

Unpacked Size

7.68 kB

Total Files

9

Last publish

Collaborators

  • fabio0107id
  • hanspro