const { literal, argument, greedyString } = require('brigadier-commands') module.exports = { register (dispatcher) { const node = dispatcher.register( literal('cb') .then( argument('command', greedyString()) .executes(c => this.runCommand(c)) ) ) node.description = 'Runs a command in the command core' node.permissionLevel = 0 }, runCommand (context) { const bot = context.source.bot bot.core.run(context.getArgument('command')) } }