1.0.1 • Published 3 years ago
rf-bot-commander v1.0.1
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