From 9910b2577a65f9f5333fe03761afb295c523befe Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Thu, 3 Mar 2022 19:29:09 +0000 Subject: [PATCH] [CodeFactor] Apply fixes to commit f1d36b9 --- src/commands/credits/index.js | 15 ++++++++++----- src/index.js | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/commands/credits/index.js b/src/commands/credits/index.js index 6baac7b..0fa9b20 100644 --- a/src/commands/credits/index.js +++ b/src/commands/credits/index.js @@ -79,15 +79,20 @@ module.exports = { async execute(interaction) { if (interaction.options.getSubcommand() === 'balance') { await balance(interaction); - } else if (interaction.options.getSubcommand() === 'gift') { + } + else if (interaction.options.getSubcommand() === 'gift') { await gift(interaction); - } else if (interaction.options.getSubcommand() === 'give') { + } + else if (interaction.options.getSubcommand() === 'give') { await give(interaction); - } else if (interaction.options.getSubcommand() === 'redeem') { + } + else if (interaction.options.getSubcommand() === 'redeem') { await redeem(interaction); - } else if (interaction.options.getSubcommand() === 'take') { + } + else if (interaction.options.getSubcommand() === 'take') { await take(interaction); - } else if (interaction.options.getSubcommand() === 'top') { + } + else if (interaction.options.getSubcommand() === 'top') { await top(interaction); } }, diff --git a/src/index.js b/src/index.js index d13a036..a53f9d6 100644 --- a/src/index.js +++ b/src/index.js @@ -46,7 +46,8 @@ client.on('interactionCreate', async (interaction) => { }); await command.execute(interaction); await logger.debug(`Executing command: ${interaction.commandName}`); - } catch (err) { + } + catch (err) { await logger.error(err); await interaction.reply({ embeds: [