From 9770687a320f04444c813c4f976892071bfbf864 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Mon, 29 Jun 2020 09:12:28 +0100 Subject: [PATCH] working update for whatAppToUse --- data/bot/faq/whatAppToUse.js | 33 ++++++++++----------------------- data/group/subs.json | 12 ++++++------ 2 files changed, 16 insertions(+), 29 deletions(-) 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 diff --git a/data/group/subs.json b/data/group/subs.json index 7492750..1e09f7b 100644 --- a/data/group/subs.json +++ b/data/group/subs.json @@ -1,6 +1,6 @@ [{ "SUB": "Insanity", - "COST": "X", + "COST": 0, "STATUS": 1, "IMAGE": "./data/group/Insanity.jpg", "APPS": [ @@ -12,7 +12,7 @@ }, { "SUB": "VIP", - "COST": "X", + "COST": 0, "STATUS": 1, "IMAGE": "./data/group/VIP.jpg", "APPS": [ @@ -21,7 +21,7 @@ }, { "SUB": "Premium Plus", - "COST": "X", + "COST": 0, "STATUS": 1, "IMAGE": "./data/group/Premium_Plus.jpg", "APPS": [ @@ -30,7 +30,7 @@ }, { "SUB": "Premium", - "COST": "X", + "COST": 0, "STATUS": 1, "IMAGE": "./data/group/Premium.jpg", "APPS": [ @@ -39,7 +39,7 @@ }, { "SUB": "Gold", - "COST": "X", + "COST": 0, "STATUS": 1, "IMAGE": "./data/group/Gold.jpg", "APPS": [ @@ -48,7 +48,7 @@ }, { "SUB": "Bronze", - "COST": "X", + "COST": 0, "STATUS": 1, "IMAGE": "./data/group/Bronze.jpg", "APPS": [