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

18 lines
396 B
JavaScript

const { literal } = require('brigadier-commands')
module.exports = {
register (dispatcher) {
const node = dispatcher.register(
literal('rc')
.executes(c => this.refillCoreCommand(c))
)
node.description = "Refills the bot's command core"
node.permissionLevel = 0
},
refillCoreCommand (context) {
const bot = context.source.bot
bot.core.reset()
}
}