updating for feed saving
This commit is contained in:
@@ -14,7 +14,8 @@ module.exports = {
|
|||||||
|
|
||||||
libFlayer.addSource(title,link);
|
libFlayer.addSource(title,link);
|
||||||
message.reply(`Adding ${title} to the list of RSS sources`);
|
message.reply(`Adding ${title} to the list of RSS sources`);
|
||||||
libFlayer.writeFeed();
|
var sources = libFlayer.getSources();
|
||||||
|
libFlayer.writeFeed(sources);
|
||||||
libFlayer.loadFeeds();
|
libFlayer.loadFeeds();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ exports.addSource = function(title,source){
|
|||||||
title: `${title}`,
|
title: `${title}`,
|
||||||
link: `${source}`
|
link: `${source}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i=0; i<feeds.length; i++){
|
||||||
|
if (feeds[i].link == source){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
feeds.push(linkData);
|
feeds.push(linkData);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user