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

21 lines
534 B
JavaScript

const { literal } = require('brigadier-commands')
module.exports = {
register (dispatcher) {
const node = dispatcher.register(
literal('validate')
.requires(source => source.permissionLevel >= 1)
.executes(c => this.validateCommand(c))
)
node.description = 'Checks if a hash is valid'
node.permissionLevel = 1
},
validateCommand (context) {
const source = context.source
const bot = source.bot
source.sendFeedback({ text: 'Valid hash', ...bot.styles.primary }, false)
}
}