mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 15:47:57 -05:00
discord *list fix again???
This commit is contained in:
parent
f6bca256e1
commit
26fe299201
2 changed files with 3 additions and 9 deletions
|
@ -7,18 +7,14 @@ module.exports = {
|
|||
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]);
|
||||
}
|
||||
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')) {
|
||||
for (const property of bot.players.list) {
|
||||
bot.core.run('essentials:sudo ' + property.UUID + ' ' + args[0]);
|
||||
}
|
||||
bot.core.run(`essentials:sudo * ${args.join(' ')}`);
|
||||
} else {
|
||||
throw new Error('You\'re not in the trusted role!');
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ module.exports = {
|
|||
return;
|
||||
}
|
||||
},
|
||||
discordExecute: async function(bot, username, usernameraw, sender, prefix, args, channeldc) {
|
||||
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc) {
|
||||
try {
|
||||
let players = '';
|
||||
for (const property of bot.players.list) {
|
||||
|
@ -31,8 +31,6 @@ module.exports = {
|
|||
.setTitle('Players')
|
||||
.setDescription(players);
|
||||
channeldc.send({embeds: [Embed]});
|
||||
|
||||
players = '';
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue