18 lines
385 B
JavaScript
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()
|
|
}
|
|
}
|