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