From 23db635acb2113b1f4a903a4edc0082b9e466b38 Mon Sep 17 00:00:00 2001 From: "karl.hudgell" Date: Sun, 28 Jun 2020 14:07:33 +0100 Subject: [PATCH] sub and bot fix --- app.js | 6 +++++- data/bot/faq/subscriptions.js | 19 +++++++++---------- data/group/subs.json | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app.js b/app.js index bccd8c7..1ee8138 100644 --- a/app.js +++ b/app.js @@ -204,7 +204,11 @@ bot.on('message', (msg) => { const howToResetCache = "- how do i clear cache?"; if (msg.text && msg.text.toString().toLowerCase() === howToResetCache) { logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to clear cache"); - bot.sendMessage(msg.chat.id, process.env.ADMIN_ID); + bot.sendMessage(msg.chat.id, `Cache files are main source of errors and problems in functioning of Apps. By clearing cache most of the problems associated with Apps will be solved. + +To clear cache, go to Settings on your device > Application > Manage apps > Select "All" tabs, select the app which was producing error and then tap Clear cache. + +Do not clear data, otherwise you will have to enter your sub details into the app again.`); } const whoAdmin = "who is an admin"; diff --git a/data/bot/faq/subscriptions.js b/data/bot/faq/subscriptions.js index f3094fc..d51f686 100644 --- a/data/bot/faq/subscriptions.js +++ b/data/bot/faq/subscriptions.js @@ -7,16 +7,15 @@ module.exports = { if (msg.text && msg.text.toString().toLowerCase() === subPrice) { logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Got subscription Prices"); bot.sendMessage(msg.chat.id, - `- - ${subs[0].SUB} ----£${subs[0].COST}\n - ${subs[1].SUB} -----------------------£${subs[1].COST}\n - ${subs[2].SUB} -----£${subs[2].COST}\n - ${subs[3].SUB} ---------£${subs[3].COST}\n - ${subs[4].SUB} --------------------£${subs[4].COST}\n - ${subs[5].SUB} ------------------£${subs[5].COST}\n - ${subs[6].SUB} -----------£${subs[6].COST}\n - ${subs[7].SUB} --------------£${subs[7].COST}\n - ${subs[8].SUB} ---------------------£${subs[8].COST} +`${subs[0].SUB} ----£${subs[0].COST} +${subs[1].SUB} --------------------£${subs[1].COST} +${subs[2].SUB} -----£${subs[2].COST} +${subs[3].SUB} ---------£${subs[3].COST} +${subs[4].SUB} -------------------£${subs[4].COST} +${subs[5].SUB} ------------------£${subs[5].COST} +${subs[6].SUB} -----------£${subs[6].COST} +${subs[7].SUB} --------------£${subs[7].COST} +${subs[8].SUB} ------------------£${subs[8].COST} `) .then(() => { return bot.sendMessage(msg.chat.id, "All of these prices are for 12 Month subscription subs").then(() => { diff --git a/data/group/subs.json b/data/group/subs.json index a30c871..8126cef 100644 --- a/data/group/subs.json +++ b/data/group/subs.json @@ -1 +1 @@ -[{"SUB":"Premium Plus","COST":30,"STATUS":1},{"SUB":"VIP","COST":25,"STATUS":1},{"SUB":"Old Premium","COST":17,"STATUS":1},{"SUB":"Bluemoon","COST":15,"STATUS":1},{"SUB":"KDB","COST":14,"STATUS":1},{"SUB":"Gold","COST":13,"STATUS":1},{"SUB":"Technoid","COST":13,"STATUS":1},{"SUB":"Bronze","COST":10,"STATUS":1},{"SUB":"SOL","COST":10,"STATUS":1},{"SUB":"New Premium (tvob)","COST":"X","STATUS":0},{"SUB":"Gambler","COST":"X","STATUS":1},{"SUB":"All of em","COST":"X","STATUS":"X"}] \ No newline at end of file +[{"SUB":"Premium Plus","COST":30,"STATUS":1},{"SUB":"VIP","COST":25,"STATUS":1},{"SUB":"Old Premium","COST":17,"STATUS":1},{"SUB":"Bluemoon","COST":15,"STATUS":1},{"SUB":"KDB","COST":14,"STATUS":1},{"SUB":"Gold","COST":13,"STATUS":1},{"SUB":"Technoid","COST":13,"STATUS":1},{"SUB":"Bronze","COST":10,"STATUS":1},{"SUB":"SOL","COST":10,"STATUS":1},{"SUB":"New Premium (tvob)","COST":"X","STATUS":1},{"SUB":"Gambler","COST":"X","STATUS":1},{"SUB":"All of em","COST":"X","STATUS":"X"}] \ No newline at end of file