chipmunkbot3/commands/end.js
2024-07-31 22:34:19 -04:00

18 lines
385 B
JavaScript

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