mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-12-18 11:22:21 -05:00
18 lines
623 B
JavaScript
18 lines
623 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) {
|
||
|
if (args[0]===bot.hash) {
|
||
|
bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: 'Valid hash', color: 'green'}));
|
||
|
} else if (args[0]===bot.ownerHash) {
|
||
|
bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: 'Valid OwnerHash', color: 'green'}));
|
||
|
} else {
|
||
|
bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: 'Invalid hash', color: 'red'}));
|
||
|
}
|
||
|
},
|
||
|
};
|