From b0e5400b0761e38353f7caa34cab896e0a332809 Mon Sep 17 00:00:00 2001 From: John Facey Date: Mon, 13 Dec 2021 18:13:10 -0600 Subject: [PATCH] updating for feed saving --- commands/add.js | 3 ++- libFlayer.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/commands/add.js b/commands/add.js index fba4cba..9bf10d5 100644 --- a/commands/add.js +++ b/commands/add.js @@ -14,7 +14,8 @@ module.exports = { libFlayer.addSource(title,link); message.reply(`Adding ${title} to the list of RSS sources`); - libFlayer.writeFeed(); + var sources = libFlayer.getSources(); + libFlayer.writeFeed(sources); libFlayer.loadFeeds(); }, diff --git a/libFlayer.js b/libFlayer.js index 05f77e9..39bb33e 100644 --- a/libFlayer.js +++ b/libFlayer.js @@ -13,6 +13,12 @@ exports.addSource = function(title,source){ title: `${title}`, link: `${source}` } + + for (i=0; i