aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2022-03-30 22:01:18 -0400
committerAndrew Lee <alee14498@protonmail.com>2022-03-30 22:01:18 -0400
commitdaf3c1735513bb252614a0047116088e242f7984 (patch)
treec72d573c342b76580d24ca19888150dca94b62bc /commands
parent3f81f1086f46b8e1882ed0827483a22929330be3 (diff)
downloadDLAP-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.js8
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