This commit is contained in:
John Facey
2021-12-09 21:18:12 -06:00
parent 73b6acf423
commit 99c1641209
2 changed files with 34 additions and 3 deletions

View File

@@ -15,17 +15,29 @@ module.exports = {
message.reply('Searching for: ' + search);
let i = 0;
let iSave = 0
let count = 0;
var feedArray = libFlayer.getFeeds();
feedArray.forEach(linkFlay => {
if (linkFlay.title.toLowerCase().indexOf(search.toLowerCase()) > -1) {
iSave = i;
found = true;
console.log(linkFlay.title);
message.reply(`Use !get ${i} to view: ${linkFlay.title}`);
count++;
}
i++;
});
if (count == 1) {
//message.channel.send('Displaying 1 result');
//message.channel.send('!get '+iSave);
}
if (count > 0) {
message.channel.send(`Displaying results for: ${search}`);
}
if (!found) {
message.reply(`No results found for: ${search}`);
}

View File

@@ -10,6 +10,25 @@
{
"title": "Arstechnica",
"link": "http://feeds.arstechnica.com/arstechnica/index"
}
},
{
"title": "TechCrunchGadgets",
"link": "https://techcrunch.com/gadgets/feed/"
},
{
"title": "BusinessInsider",
"link": "https://markets.businessinsider.com/rss/news"
},
{
"title": "TheGuardian",
"link": "https://www.theguardian.com/world/rss"
},
{
"title": "Yahoo",
"link": "https://news.google.com/news/rss"
},
{
"title": "CBSWorldNews",
"link": "https://www.cbsnews.com/latest/rss/world"
}
]