chomens-bot-js/commands/ayunsudo.js
2022-08-14 16:51:45 +07:00

16 lines
442 B
JavaScript

module.exports = {
name: 'ayunsudo',
alias: [],
description: 'Sudo everyone on Ayunboom!',
trusted: 1,
usage: '<hash> <c:|command>',
execute: function(bot, username, usernameraw, sender, prefix, args) {
if (args[0]===bot.hash) {
for (const property of bot.players.list) {
bot.core.run('essentials:sudo ' + property.UUID + ' ' + args[1]);
}
} else {
throw new Error('Invalid hash');
}
},
};