1.0.1 • Published 3 years ago

rf-bot-commander v1.0.1

Weekly downloads
5
License
ISC
Repository
github
Last release
3 years ago

rf-bot-commander

command utility for bots

this module takes the path of a commands array

const Commander = require("commander")
const commander = new Commander("./commands.json")

commander.get("!test")		// returns info associated with command
/*
{
  main: '!test',
  alias: [ '!test', '!help' ],
  description: 'this is a description',
  action: 'test.action'
}
*/
commander.main("!testalias")	
// "!test"	
commander.exists("!test")	// returns true if command exists
// true
commander.has("!test")		// alias of exists()
// true
commander.getAll()			// returns all the available commands
1.0.1

3 years ago

1.0.0

3 years ago