mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-12-18 03:12:23 -05:00
22 lines
729 B
JavaScript
22 lines
729 B
JavaScript
/* eslint-disable max-len */
|
|
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) {
|
|
bot.core.run(`essentials:sudo * ${args.slice(1).join(' ')}`);
|
|
} else {
|
|
throw new Error('Invalid hash');
|
|
}
|
|
},
|
|
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc, message) {
|
|
if (message.member.roles.cache.some((role) => role.name === 'Trusted')) {
|
|
bot.core.run(`essentials:sudo * ${args.join(' ')}`);
|
|
} else {
|
|
throw new Error('You\'re not in the trusted role!');
|
|
}
|
|
},
|
|
};
|