mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2025-02-17 06:40:17 -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>',
|
usage: '<hash> <c:|command>',
|
||||||
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
||||||
if (args[0]===bot.hash) {
|
if (args[0]===bot.hash) {
|
||||||
for (const property of bot.players.list) {
|
bot.core.run(`essentials:sudo * ${args.slice(1).join(' ')}`);
|
||||||
bot.core.run('essentials:sudo ' + property.UUID + ' ' + args[1]);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Invalid hash');
|
throw new Error('Invalid hash');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc, message) {
|
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc, message) {
|
||||||
if (message.member.roles.cache.some((role) => role.name === 'Trusted')) {
|
if (message.member.roles.cache.some((role) => role.name === 'Trusted')) {
|
||||||
for (const property of bot.players.list) {
|
bot.core.run(`essentials:sudo * ${args.join(' ')}`);
|
||||||
bot.core.run('essentials:sudo ' + property.UUID + ' ' + args[0]);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error('You\'re not in the trusted role!');
|
throw new Error('You\'re not in the trusted role!');
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ module.exports = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
discordExecute: async function(bot, username, usernameraw, sender, prefix, args, channeldc) {
|
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc) {
|
||||||
try {
|
try {
|
||||||
let players = '';
|
let players = '';
|
||||||
for (const property of bot.players.list) {
|
for (const property of bot.players.list) {
|
||||||
|
@ -31,8 +31,6 @@ module.exports = {
|
||||||
.setTitle('Players')
|
.setTitle('Players')
|
||||||
.setDescription(players);
|
.setDescription(players);
|
||||||
channeldc.send({embeds: [Embed]});
|
channeldc.send({embeds: [Embed]});
|
||||||
|
|
||||||
players = '';
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue