From c688251a01eeaa5765f791f0c491887193762db2 Mon Sep 17 00:00:00 2001 From: John Facey Date: Fri, 24 Dec 2021 18:36:49 -0600 Subject: [PATCH] patched search display results --- commands/search.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/search.js b/commands/search.js index e7b04c7..7bc9543 100644 --- a/commands/search.js +++ b/commands/search.js @@ -18,24 +18,27 @@ module.exports = { let iSave = 0 let count = 0; var feedArray = libFlayer.getFeeds(); + var searchString = ""; 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}`); + searchString += `Use !get ${i} to view: ${linkFlay.title} \n`; count++; } i++; }); + + message.reply(searchString); if (count == 1) { //message.channel.send('Displaying 1 result'); //message.channel.send('!get '+iSave); } if (count > 0) { - message.channel.send(`Displaying results for: ${search}`); + message.channel.send(`Displayed results for: ${search}`); } if (!found) {