From 77e1e8fcd8cf63f653c679f03e3a258e752fb08f Mon Sep 17 00:00:00 2001 From: Cyper Date: Thu, 31 Jul 2025 16:51:39 -0400 Subject: [PATCH] chore: Simplified logging logic --- index.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 0d11036..e503649 100644 --- a/index.js +++ b/index.js @@ -236,11 +236,8 @@ client.on(Events.InteractionCreate, async interaction => { data = loadData(); const keyCheck = data.keys ? data.keys.length : 0; if (keyCheck === 0) { - if (data.loggingChannel) { - - if (channel) { - channel.send(formatNoKeysMessage(interaction.user.id, interaction.user.tag)); - } + if (channel) { + channel.send(formatNoKeysMessage(interaction.user.id, interaction.user.tag)); } return interaction.reply({ content: 'There was an error retrieving your keys. Please reach out to <@404872989188816906> in <#580122303342313473>!', ephemeral: true }); } @@ -253,13 +250,11 @@ client.on(Events.InteractionCreate, async interaction => { saveData(data); // Send warnings for low key count - if (data.loggingChannel) { - if (channel) { - if (keyCount <= 10) { - channel.send(`⚠️ Only ${keyCount} keys left in the vault!`); - } else if (keyCount <= 50) { - channel.send(`⚠️ Only ${keyCount} keys left in the vault.`); - } + if (channel) { + if (keyCount <= 10) { + channel.send(`⚠️ Only ${keyCount} keys left in the vault!`); + } else if (keyCount <= 50) { + channel.send(`⚠️ Only ${keyCount} keys left in the vault.`); } }