const { literal } = require('brigadier-commands') module.exports = { register (dispatcher) { const node = dispatcher.register( literal('end') .executes(this.endCommand) ) node.description = "Ends the bot's connection to the server" node.permissionLevel = 0 }, endCommand (context) { const bot = context.source.bot bot.end() } }