From daf3c1735513bb252614a0047116088e242f7984 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 30 Mar 2022 22:01:18 -0400 Subject: Fixed list command; Fixed name on some files --- commands/list.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'commands') diff --git a/commands/list.js b/commands/list.js index 2b81acb..247e060 100644 --- a/commands/list.js +++ b/commands/list.js @@ -20,7 +20,7 @@ ***************************************************************************/ import { SlashCommandBuilder } from '@discordjs/builders' -import fs from 'fs' +import { readdirSync } from 'fs' const musicFolder = './music'; @@ -29,9 +29,7 @@ export default { .setName('list') .setDescription('Lists the available audio tracks'), async execute(interaction) { - await interaction.reply('Listing the available audio tracks...'); - fs.readdirSync(musicFolder).forEach(file => { - console.log(file); - }); + const beats = readdirSync(musicFolder).join('\n'); + await interaction.reply(`Listing the available audio tracks...\`\`\`${beats}\`\`\``); }, }; \ No newline at end of file -- cgit v1.2.3