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()
  }
}