list command better!1!!

This commit is contained in:
ChomeNS 2022-08-19 11:41:28 +07:00
parent ad734e0f6a
commit 61e753c858
2 changed files with 8 additions and 7 deletions

View file

@ -1,4 +1,5 @@
[ [
"Better auto refill on core break (instead of clooping fill core command in the core)", "Better auto refill on core break (instead of clooping fill core command in the core)",
"*music list colors" "*music list colors",
"Try catch *list"
] ]

View file

@ -11,9 +11,9 @@ module.exports = {
try { try {
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: 'Players:', color: 'green'}])); bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: 'Players:', color: 'green'}]));
await sleep(60); await sleep(60);
for (const property of bot.tabcompleteplayers) { for (const property of bot.players.getPlayers()) {
if (property.match.startsWith('@')) continue; // if (property.match.startsWith('@')) continue;
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: `${property.match}`, color: 'yellow'}, {text: ' ', color: 'aqua'}, {text: `${bot.players.getPlayer(property.match).UUID}`, color: 'aqua'}])); bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: `${property.name}`, color: 'yellow'}, {text: ' ', color: 'aqua'}, {text: `${property.UUID}`, color: 'aqua'}]));
} }
} catch (e) { } catch (e) {
return; return;
@ -22,9 +22,9 @@ module.exports = {
discordExecute: async function(bot, username, usernameraw, sender, prefix, args, channeldc) { discordExecute: async function(bot, username, usernameraw, sender, prefix, args, channeldc) {
try { try {
let players = ''; let players = '';
for (const property of bot.tabcompleteplayers) { for (const property of bot.players.getPlayers()) {
if (property.match.startsWith('@')) continue; // if (property.match.startsWith('@')) continue;
players += `\`${property.match}\` \`${bot.players.getPlayer(property.match).UUID}\`` + '\n'; players += `\`${property.name}\` \`${property.UUID}\`` + '\n';
} }
const Embed = new MessageEmbed() const Embed = new MessageEmbed()
.setColor('#FFFF00') .setColor('#FFFF00')