update
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
23
feeds.json
23
feeds.json
@@ -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"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user