From c8cf6e35f77a9b7dfca9aa69c42e7b2dc549a643 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sat, 25 Feb 2023 14:49:03 -0500 Subject: [PATCH] Improved function to work with updated storage --- commands/add.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/commands/add.js b/commands/add.js index 91fb45a..cedb327 100644 --- a/commands/add.js +++ b/commands/add.js @@ -30,20 +30,19 @@ module.exports = { if (!category) category = "ALL"; - libCore.addSource(title, link, category, interaction.guildId, interaction.channelId, (err, result) => { - console.log("Result from adding entry", result); + await libCore.addSource(title, link, category, interaction.guildId, interaction.channelId, (err, result) => { + log.DEBUG("Result from adding entry", result); if (result) { interaction.reply(`Adding ${title} to the list of RSS sources`); } else { interaction.reply(`${title} already exists in the list of RSS sources`); - } - - libCore.loadFeeds(); + } }); }catch(err){ log.ERROR(err) - await message.reply(err.toString()); + await interaction.reply(err.toString()); } + libCore.loadFeeds(); } }; \ No newline at end of file