From 626cef85162b08c1808d8f88b5b245060ff0dd54 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 10 Jul 2022 01:05:59 -0400 Subject: Added another eslint rule --- commands/about.js | 2 +- commands/join.js | 2 +- commands/leave.js | 2 +- commands/list.js | 4 ++-- commands/pause.js | 2 +- commands/ping.js | 2 +- commands/play.js | 2 +- commands/reshuffle.js | 3 +-- commands/shutdown.js | 2 +- commands/skip.js | 2 +- commands/status.js | 2 +- 11 files changed, 12 insertions(+), 13 deletions(-) (limited to 'commands') diff --git a/commands/about.js b/commands/about.js index fa6d8a2..e87f1a6 100644 --- a/commands/about.js +++ b/commands/about.js @@ -29,7 +29,7 @@ export default { data: new SlashCommandBuilder() .setName('about') .setDescription('Information about the bot'), - async execute (interaction, bot) { + async execute(interaction, bot) { const aboutEmbed = new MessageEmbed() .setAuthor({ name: `About ${bot.user.username}`, iconURL: bot.user.avatarURL() }) .addField('Information', 'A Discord bot that plays local audio tracks.') diff --git a/commands/join.js b/commands/join.js index b309f97..02c50a4 100644 --- a/commands/join.js +++ b/commands/join.js @@ -28,7 +28,7 @@ export default { .setName('join') .setDescription('Joins voice chat') .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute (interaction, bot) { + async execute(interaction, bot) { await interaction.reply({ content: 'Joining voice channel', ephemeral: true }); return await voiceInit(bot); } diff --git a/commands/leave.js b/commands/leave.js index b37ebdc..a066e38 100644 --- a/commands/leave.js +++ b/commands/leave.js @@ -28,7 +28,7 @@ export default { .setName('leave') .setDescription('Leaves the voice chat') .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute (interaction) { + async execute(interaction) { console.log('Leaving voice channel...'); await destroyAudio(interaction); return await interaction.reply({ content: 'Leaving voice channel', ephemeral: true }); diff --git a/commands/list.js b/commands/list.js index 9d7a7fd..8f2010b 100644 --- a/commands/list.js +++ b/commands/list.js @@ -28,11 +28,11 @@ export default { data: new SlashCommandBuilder() .setName('list') .setDescription('Lists the available audio tracks'), - async execute (interaction) { + async execute(interaction) { // If someone figures out how to either split the list or make pages when the max character reaches, please do so and make a pull request. const beats = readdirSync(musicFolder).join('\n'); - readdir(musicFolder, async (err, files) => { + readdir(musicFolder, async(err, files) => { await interaction.reply( `Listing ${files.length} audio tracks...\n\`\`\`\n${beats}\n\`\`\`` ); diff --git a/commands/pause.js b/commands/pause.js index 629d423..8d42459 100644 --- a/commands/pause.js +++ b/commands/pause.js @@ -28,7 +28,7 @@ export default { .setName('pause') .setDescription('Pauses music') .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute (interaction) { + async execute(interaction) { if (isAudioStatePaused === false) { audioState(); player.pause(); diff --git a/commands/ping.js b/commands/ping.js index 574afc8..0c6b887 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -25,7 +25,7 @@ export default { data: new SlashCommandBuilder() .setName('ping') .setDescription('Pong!'), - async execute (interaction, bot) { + async execute(interaction, bot) { return await interaction.reply(`Pong! ${Math.round(bot.ws.ping)}ms`); } }; diff --git a/commands/play.js b/commands/play.js index 324573d..4145f54 100644 --- a/commands/play.js +++ b/commands/play.js @@ -35,7 +35,7 @@ export default { ) .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute (interaction, bot) { + async execute(interaction, bot) { integer = interaction.options.getInteger('int'); if (integer) { if (integer < files.length) { diff --git a/commands/reshuffle.js b/commands/reshuffle.js index c0ad342..162a52e 100644 --- a/commands/reshuffle.js +++ b/commands/reshuffle.js @@ -28,8 +28,7 @@ export default { .setName('reshuffle') .setDescription('Reshuffles the playlist') .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute (interaction, bot) { - // Command not fully functional yet + async execute(interaction, bot) { await interaction.reply({ content: 'Reshuffling the playlist...', ephemeral: true }); player.stop(); return await shufflePlaylist(bot); diff --git a/commands/shutdown.js b/commands/shutdown.js index 6e3c52b..196b289 100644 --- a/commands/shutdown.js +++ b/commands/shutdown.js @@ -28,7 +28,7 @@ export default { .setName('shutdown') .setDescription('Powers off the bot') .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute (interaction, bot) { + async execute(interaction, bot) { await interaction.reply({ content: 'Powering off...', ephemeral: true }); return await stopBot(bot, interaction); } diff --git a/commands/skip.js b/commands/skip.js index 189aab7..b276790 100644 --- a/commands/skip.js +++ b/commands/skip.js @@ -28,7 +28,7 @@ export default { .setName('skip') .setDescription('Skips the audio track') .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute (interaction, bot) { + async execute(interaction, bot) { await interaction.reply({ content: `Skipping ${audio}`, ephemeral: true }); player.stop(); return await nextAudio(bot, interaction); diff --git a/commands/status.js b/commands/status.js index 9871157..c78e736 100644 --- a/commands/status.js +++ b/commands/status.js @@ -27,7 +27,7 @@ export default { data: new SlashCommandBuilder() .setName('status') .setDescription('Checks what audio file is playing currently'), - async execute (interaction, bot) { + async execute(interaction, bot) { let audioID = currentTrack; audioID++; -- cgit v1.2.3