From 067a26460663e1d43173f02d6f5f7259cba6c21f Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sun, 28 Jun 2020 22:04:01 +0100 Subject: [PATCH] fixed the message --- data/bot/faq/whatAppToUse.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/data/bot/faq/whatAppToUse.js b/data/bot/faq/whatAppToUse.js index beeb52b..e4f5987 100644 --- a/data/bot/faq/whatAppToUse.js +++ b/data/bot/faq/whatAppToUse.js @@ -24,7 +24,7 @@ module.exports = { }, appSwitch: (bot, msg, logger) => { let string = "" - if (subArray.indexOf(msg.text && msg.text.toString().toLowerCase())) { + if (subArray.splice(-1,1).some(v => msg.text.toString().includes(v))) { var checkSub = msg.text.substring(2) subs.forEach(element => { if (element.SUB === checkSub) { @@ -37,5 +37,19 @@ 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) + // subs.forEach(element => { + // if (element.SUB === checkSub) { + // element.APPS.forEach(element => { + // let catString = element + // string += '\n' + catString; + // }) + // } + // } + // ); + // bot.sendMessage(msg.chat.id, "You can use -" + string + "\n\nAll can be downloaded from our FileLinked") + // } } } \ No newline at end of file