21 lines
534 B
JavaScript
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)
|
|
}
|
|
}
|