diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2022-03-30 22:01:18 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2022-03-30 22:01:18 -0400 |
| commit | daf3c1735513bb252614a0047116088e242f7984 (patch) | |
| tree | c72d573c342b76580d24ca19888150dca94b62bc /commands | |
| parent | 3f81f1086f46b8e1882ed0827483a22929330be3 (diff) | |
| download | DLAP-daf3c1735513bb252614a0047116088e242f7984.tar.gz DLAP-daf3c1735513bb252614a0047116088e242f7984.tar.bz2 DLAP-daf3c1735513bb252614a0047116088e242f7984.zip | |
Fixed list command; Fixed name on some files
Diffstat (limited to 'commands')
| -rw-r--r-- | commands/list.js | 8 |
1 files changed, 3 insertions, 5 deletions
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 |
