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