chomens-bot-js/commands/ayunsudo.js

17 lines
442 B
JavaScript
Raw Normal View History

2022-08-14 05:51:45 -04:00
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');
}
},
};