chomens-bot-js/commands/validate.js
2022-11-16 18:09:37 +07:00

17 lines
533 B
JavaScript

/* eslint-disable max-len */
module.exports = {
name: 'validate',
description: 'Validates hash',
alias: [],
usage: '<hash>',
trusted: 1,
execute: function(bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash) {
if (args[0] === hash) {
bot.tellraw('@a', {text: 'Valid hash', color: 'green'});
} else if (args[0] === ownerhash) {
bot.tellraw('@a', {text: 'Valid OwnerHash', color: 'green'});
} else {
bot.tellraw('@a', {text: 'Invalid hash', color: 'red'});
}
},
};