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}`);
}