diff --git a/data/bot/faq/whatAppToUse.js b/data/bot/faq/whatAppToUse.js index 2586576..5a2c501 100644 --- a/data/bot/faq/whatAppToUse.js +++ b/data/bot/faq/whatAppToUse.js @@ -27,30 +27,17 @@ module.exports = { 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 => { - let catString = element - string += '\n' + catString; - }) + subs.forEach(element => { + if (element.SUB === checkSub) { + element.APPS.forEach(element => { + let catString = element + string += '\n' + catString; + }) + } } + ); + bot.sendMessage(msg.chat.id, checkSub + " can use -" + string + "\n\nAll can be downloaded from our FileLinked") } - ); - 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