2.0.0 • Published 3 years ago
rf-bot-template v2.0.0
rf-bot-template
structure
context flow action
Commander
// commands.json
[
{
"main": "test",
"alias": ["test"],
"action": "",
"description": "this is a test command"
},
{
"main": "help",
"alias": ["help","commands","command"],
"action": "",
"description": "this is a helper command"
}
]
const Commander = require("commander")
const commander = new Commander("./commands.json")
commander.get("!test") // returns info associated with command
commander.exists("!test") // returns true if command exists
commander.has("!test") // alias of exists()
commander.getAll() // returns all the available commands
// revised vbot flow
2.0.0
3 years ago