2022-10-14 04:46:41 -04:00
|
|
|
/* eslint-disable max-len */
|
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) {
|
2022-11-07 07:26:38 -05:00
|
|
|
if (args[0] === bot.hash) {
|
2022-10-17 04:54:24 -04:00
|
|
|
bot.core.run(`essentials:sudo * ${args.slice(1).join(' ')}`);
|
2022-08-14 05:51:45 -04:00
|
|
|
} else {
|
|
|
|
throw new Error('Invalid hash');
|
|
|
|
}
|
|
|
|
},
|
2022-10-14 04:46:41 -04:00
|
|
|
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc, message) {
|
2022-11-07 08:53:45 -05:00
|
|
|
if (message.member.roles.cache.some((role) => role.name === 'Trusted')) {
|
2022-10-17 04:54:24 -04:00
|
|
|
bot.core.run(`essentials:sudo * ${args.join(' ')}`);
|
2022-10-14 04:46:41 -04:00
|
|
|
} else {
|
|
|
|
throw new Error('You\'re not in the trusted role!');
|
|
|
|
}
|
|
|
|
},
|
2022-08-14 05:51:45 -04:00
|
|
|
};
|