diff --git a/commands/music.js b/commands/music.js index 2153918..a5026c5 100644 --- a/commands/music.js +++ b/commands/music.js @@ -61,19 +61,19 @@ module.exports = { const absolutePath = await resolve(SONGS_PATH); const listed = await list(absolutePath); - let color = '§6'; - let message = ''; + let color = 'gold'; + const message = []; listed.forEach((value) => { - if (color==='§6') { - color = '§e'; - } else if (color==='§e') { - color = '§6'; + if (color==='gold') { + color = 'yellow'; + } else if (color==='yellow') { + color = 'gold'; }; - message += color + value + ' '; + message.push({text: value + ' ', color, clickEvent: {action: 'suggest_command', value: `*music play ${value}`}}); }); - bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: message, color: 'red'})); + bot.core.run('minecraft:tellraw @a ' + JSON.stringify(message)); }; if (args[0]==='play') {