From 4941d5cb3f6a0d7a4f92fe2bba21b107c067afac Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sun, 28 Jun 2020 22:22:41 +0100 Subject: [PATCH] proper fix --- data/bot/faq/whatAppToUse.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/bot/faq/whatAppToUse.js b/data/bot/faq/whatAppToUse.js index e4f5987..2586576 100644 --- a/data/bot/faq/whatAppToUse.js +++ b/data/bot/faq/whatAppToUse.js @@ -24,8 +24,9 @@ module.exports = { }, appSwitch: (bot, msg, logger) => { let string = "" - if (subArray.splice(-1,1).some(v => msg.text.toString().includes(v))) { + if (subArray.some(v => msg.text.toString().includes(v))) { var checkSub = msg.text.substring(2) + if (checkSub != "Home") { subs.forEach(element => { if (element.SUB === checkSub) { element.APPS.forEach(element => { @@ -36,7 +37,7 @@ module.exports = { } ); bot.sendMessage(msg.chat.id, "You can use -" + string + "\n\nAll can be downloaded from our FileLinked") - } + }} // } // if (subArray.indexOf(msg.text && msg.text.toString().toLowerCase())) { // var checkSub = msg.text.substring(2)