chipmunkbot3/commands/end.js

19 lines
377 B
JavaScript
Raw Normal View History

2024-04-02 17:53:10 -04:00
const { literal } = require('brigadier-commands')
2024-02-11 21:23:41 -05:00
2024-04-02 17:53:10 -04:00
module.exports = {
register (dispatcher) {
const node = dispatcher.register(
literal('end')
.executes(this.endCommand)
)
2024-02-11 21:23:41 -05:00
2024-04-02 17:53:10 -04:00
node.description = "Ends the bot's connection to the server"
node.permissionLevel = 0
},
2024-02-11 21:23:41 -05:00
2024-04-02 17:53:10 -04:00
endCommand (context) {
const bot = context.source.bot
bot.end()
}
}