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