From 9286548bfd2070b914056f9b1c765c77d7d89603 Mon Sep 17 00:00:00 2001
From: "karl.hudgell" <karl.hudgell@bjss.com>
Date: Thu, 25 Jun 2020 16:17:46 +0100
Subject: [PATCH 1/7] working initial competition logic

---
 app.js            | 98 +++++++++++++++++++++++++++++++++++++++++------
 package-lock.json | 97 ++++++++++++++++++++++++++++++++++++++++++++++
 package.json      |  2 +-
 3 files changed, 184 insertions(+), 13 deletions(-)

diff --git a/app.js b/app.js
index 4dfa217..9802fee 100644
--- a/app.js
+++ b/app.js
@@ -2,16 +2,20 @@ require('dotenv').config();
 
 var request = require("request");
 var throttledRequest = require('throttled-request')(request);
-throttledRequest.configure({requests: 8, milliseconds: 60000}); //send 1 request per second
+throttledRequest.configure({ requests: 8, milliseconds: 60000 }); //send 1 request per second
 cachedRequest = require('cached-request')(throttledRequest);
 cachedRequest.setCacheDirectory("./cache");
 
+const fs = require('fs');
+
 const logger = require('perfect-logger');
 const TelegramBot = require('node-telegram-bot-api');
 
 const token = process.env.BOT_TOKEN;
 const name = process.env.BOT_NAME;
 const channel = process.env.CHANNEL
+const admins = JSON.parse(process.env.ADMIN_ID)
+let comp_users = []
 
 // Configure Settings
 logger.initialize(name + "_bot", {
@@ -156,9 +160,9 @@ bot.on('message', (msg) => {
     }
 
     const deal = "deal";
-    const me = 434187971
-    const sarah = 868225940
-    const MANC = 470861863
+    // const me = 434187971
+    // const sarah = 868225940
+    // const MANC = 470861863
     if (msg.text && msg.text.toString().toLowerCase().match(/\bdeal\b/)) {
         logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said we got a deal!");
         bot.sendMessage(msg.chat.id, "I LOVE it when " + msg.from.first_name + ", does a deal :)");
@@ -230,14 +234,12 @@ bot.on('message', (msg) => {
     const installoOnAndroid = "- install filelinked on android";
     if (msg.text && msg.text.toString().toLowerCase() === installoOnAndroid) {
         logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Found out how to install on Android");
-        bot.sendMessage(msg.chat.id, "First thing you need to do is go to browser on your Android TV  box and enter www.filelinked.com")
+        bot.sendMessage(msg.chat.id, "First thing you need to do is go to browser on your Android TV box and enter http://get.filelinked.com")
             .then(() => {
-                return bot.sendMessage(msg.chat.id, "From this browser page, download FileLinked.").then(() => {
-                    return bot.sendMessage(msg.chat.id, "Once you have pressed download then you can close the browser and go to your apps.").then(() => {
-                        return bot.sendMessage(msg.chat.id, "Then open file manager or file browser. In here go to downloads, filemanager, press install.").then(() => {
-                            return bot.sendMessage(msg.chat.id, "Then go back to your apps section on the box and find filelinked app.").then(() => {
-                                return bot.sendMessage(msg.chat.id, "Open the app and enter the code.")
-                            })
+                return bot.sendMessage(msg.chat.id, "Once the apk has downloaded you can close the browser and go to your apps.").then(() => {
+                    return bot.sendMessage(msg.chat.id, "Then open file manager or file browser. In here go to downloads, filemanager, press install.").then(() => {
+                        return bot.sendMessage(msg.chat.id, "Then go back to your apps section on the box and find filelinked app.").then(() => {
+                            return bot.sendMessage(msg.chat.id, "Open the app and enter the code.")
                         })
                     })
                 })
@@ -308,7 +310,79 @@ 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, "Cache files are main source of errors and problems in functioning of Apps, by clearing cache may solve most of the problems associated with Apps. To clear cache, go to Settings > Application > Manage apps > Select \"All\" tabs, select the app which was producing error and then tap Clear cache.");
+        bot.sendMessage(msg.chat.id, process.env.ADMIN_ID);
+    }
+
+    const whoAdmin = "who is an admin";
+    if (msg.text && msg.text.toString().toLowerCase() === whoAdmin) {
+        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked who is an admin");
+        admins.forEach(element =>
+            bot.sendMessage(msg.chat.id, element)
+        );
+    }
+
+    const startCompCalled = "start comp called";
+    if (msg.text && msg.text.toString().toLowerCase().includes(startCompCalled)) {
+        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked who is an admin");
+        test = msg.text.match(/\b(\w+)$/gm);
+        fs.writeFileSync('./data/' + test + '.json', '[]')
+        bot.sendMessage(msg.chat.id, 'Comp created')
+    }
+
+    const stopCompCalled = "stop comp called";
+    if (msg.text && msg.text.toString().toLowerCase().includes(stopCompCalled)) {
+        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked who is an admin");
+        test = msg.text.match(/\b(\w+)$/gm);
+        fs.unlinkSync('./data/' + test + '.json', '[]')
+        bot.sendMessage(msg.chat.id, 'Comp removed')
+    }
+
+    const comp = "entered the comp";
+    if (msg.text && msg.text.toString().toLowerCase().includes(comp)) {
+        if (admins.indexOf(msg.from.id) > -1) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked who is an admin");
+            user = msg.text.match(/^([\w\-]+)/gm)[0];
+            let comp_name = msg.text.match(/\b(\w+)$/gm)[0];
+
+            comp_users = JSON.parse(fs.readFileSync('./data/' + comp_name + '.json', 'utf8'))
+
+            let new_comp_users = comp_users.concat(user)
+
+            fs.writeFileSync('./data/' + comp_name + '.json', JSON.stringify(new_comp_users))
+
+            bot.sendMessage(msg.chat.id, user + " has been added to the competition")
+        } else {
+            console.log('not found')
+        }
+    }
+
+    const enteredTheComp = "how many in comp";
+    if (msg.text && msg.text.toString().toLowerCase().includes(enteredTheComp)) {
+        if (admins.indexOf(msg.from.id) > -1) {
+            let comp_name = msg.text.match(/\b(\w+)$/gm)[0];
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked who is an admin");
+            var comp_entered = JSON.parse(fs.readFileSync('./data/' + comp_name + '.json', 'utf8'))
+            bot.sendMessage(msg.chat.id, "There are " + comp_entered.length + " people in the comp")
+        } else {
+            console.log('not found')
+        }
+    }
+
+    const whoWon = "who won comp";
+    if (msg.text && msg.text.toString().toLowerCase().includes(whoWon)) {
+        if (admins.indexOf(msg.from.id) > -1) {
+            let comp_name = msg.text.match(/\b(\w+)$/gm)[0];
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked who is an admin");
+            var comp_entered = JSON.parse(fs.readFileSync('./data/' + comp_name + '.json', 'utf8'))
+
+            var winner = comp_entered[Math.floor(Math.random() * comp_entered.length)];
+
+            bot.sendMessage(msg.chat.id, "There winner is .....").then(() => {
+                return bot.sendMessage(msg.chat.id, winner)
+            })
+        } else {
+            console.log('not found')
+        }
     }
 
     const whatAppShouldIUse = "- what app should i use?";
diff --git a/package-lock.json b/package-lock.json
index 2d515e2..59bfa43 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -103,6 +103,11 @@
         "type-detect": "^1.0.0"
       }
     },
+    "clone": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
+      "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
+    },
     "combined-stream": {
       "version": "1.0.8",
       "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -275,6 +280,11 @@
         "mime-types": "^2.1.12"
       }
     },
+    "fs": {
+      "version": "0.0.1-security",
+      "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
+      "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
+    },
     "function-bind": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -349,6 +359,15 @@
       "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
       "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
     },
+    "is-absolute": {
+      "version": "0.2.6",
+      "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz",
+      "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=",
+      "requires": {
+        "is-relative": "^0.2.1",
+        "is-windows": "^0.2.0"
+      }
+    },
     "is-callable": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz",
@@ -367,6 +386,14 @@
         "has-symbols": "^1.0.1"
       }
     },
+    "is-relative": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz",
+      "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=",
+      "requires": {
+        "is-unc-path": "^0.1.1"
+      }
+    },
     "is-symbol": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
@@ -380,6 +407,19 @@
       "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
       "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
     },
+    "is-unc-path": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz",
+      "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=",
+      "requires": {
+        "unc-path-regex": "^0.1.0"
+      }
+    },
+    "is-windows": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz",
+      "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw="
+    },
     "isarray": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -529,6 +569,24 @@
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
       "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
     },
+    "node-cache": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/node-cache/-/node-cache-5.1.1.tgz",
+      "integrity": "sha512-bJ9nH25Z51HG2QIu66K4dMVyMs6o8bNQpviDnXzG+O/gfNxPU9IpIig0j4pzlO707GcGZ6QA4rWhlRxjJsjnZw==",
+      "requires": {
+        "clone": "2.x"
+      }
+    },
+    "node-persist": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/node-persist/-/node-persist-2.1.0.tgz",
+      "integrity": "sha1-5lK784haBNrWo1PXQXYXfIORRwc=",
+      "requires": {
+        "is-absolute": "^0.2.6",
+        "mkdirp": "~0.5.1",
+        "q": "~1.1.1"
+      }
+    },
     "node-telegram-bot-api": {
       "version": "0.50.0",
       "resolved": "https://registry.npmjs.org/node-telegram-bot-api/-/node-telegram-bot-api-0.50.0.tgz",
@@ -581,6 +639,15 @@
         "wrappy": "1"
       }
     },
+    "path": {
+      "version": "0.12.7",
+      "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+      "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+      "requires": {
+        "process": "^0.11.1",
+        "util": "^0.10.3"
+      }
+    },
     "perfect-logger": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/perfect-logger/-/perfect-logger-2.0.1.tgz",
@@ -591,6 +658,11 @@
       "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
       "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
     },
+    "process": {
+      "version": "0.11.10",
+      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+    },
     "process-nextick-args": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -615,6 +687,11 @@
       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
     },
+    "q": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/q/-/q-1.1.2.tgz",
+      "integrity": "sha1-Y1fikSBnAdmfGXq4TlforRlvKok="
+    },
     "qs": {
       "version": "6.5.2",
       "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
@@ -814,6 +891,11 @@
       "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
       "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
     },
+    "unc-path-regex": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
+      "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo="
+    },
     "uri-js": {
       "version": "4.2.2",
       "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
@@ -822,6 +904,21 @@
         "punycode": "^2.1.0"
       }
     },
+    "util": {
+      "version": "0.10.4",
+      "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+      "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+      "requires": {
+        "inherits": "2.0.3"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.3",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+          "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+        }
+      }
+    },
     "util-deprecate": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
diff --git a/package.json b/package.json
index 5f26e1c..41e401e 100644
--- a/package.json
+++ b/package.json
@@ -16,9 +16,9 @@
   "dependencies": {
     "cached-request": "^2.0.1",
     "dotenv": "^8.2.0",
+    "fs": "0.0.1-security",
     "node-telegram-bot-api": "^0.50.0",
     "perfect-logger": "^2.0.1",
-    "rapidapi-connect": "0.0.6",
     "request": "^2.88.2",
     "throttled-request": "^0.1.1"
   }

From 3b234211403c27be487b5888b05791ed6786608a Mon Sep 17 00:00:00 2001
From: "karl.hudgell" <karl.hudgell@bjss.com>
Date: Thu, 25 Jun 2020 19:45:38 +0100
Subject: [PATCH 2/7] keep going..

---
 app.js                        | 172 ++-----
 data/bot/chat.js              |  63 +++
 data/bot/faq/subscriptions.js |  38 ++
 data/bot/questions.js         |  14 +
 data/bot/requests/football.js |  47 ++
 data/bot/requests/joke.js     |  30 ++
 data/bot/welcomeMesage.js     |   7 +
 data/group/subs.json          |  57 +++
 image.png                     | Bin 0 -> 10985 bytes
 lib/logger.js                 |   9 -
 package-lock.json             | 895 +++++++++++++++++++++++++---------
 package.json                  |   6 +
 12 files changed, 962 insertions(+), 376 deletions(-)
 create mode 100644 data/bot/chat.js
 create mode 100644 data/bot/faq/subscriptions.js
 create mode 100644 data/bot/questions.js
 create mode 100644 data/bot/requests/football.js
 create mode 100644 data/bot/requests/joke.js
 create mode 100644 data/bot/welcomeMesage.js
 create mode 100644 data/group/subs.json
 create mode 100644 image.png
 delete mode 100644 lib/logger.js

diff --git a/app.js b/app.js
index 9802fee..67fcc07 100644
--- a/app.js
+++ b/app.js
@@ -11,6 +11,13 @@ const fs = require('fs');
 const logger = require('perfect-logger');
 const TelegramBot = require('node-telegram-bot-api');
 
+const bot_chat = require('./data/bot/chat')
+const bot_welcome = require('./data/bot/welcomeMesage')
+const bot_questions = require('./data/bot/questions')
+const bot_football = require('./data/bot/requests/football')
+const bot_joke = require('./data/bot/requests/joke')
+const bot_faq_subscriptions = require('./data/bot/faq/subscriptions')
+
 const token = process.env.BOT_TOKEN;
 const name = process.env.BOT_NAME;
 const channel = process.env.CHANNEL
@@ -31,153 +38,46 @@ const bot = new TelegramBot(token, {
 
 // Wlecome Message
 bot.on('new_chat_members', (msg) => {
-    const newUserMention = "<a href=\"tg:\/\/user?id=" + msg.new_chat_member.id + "\">@" + msg.new_chat_member.first_name + "<\/a>"
-    bot.sendMessage(msg.chat.id, "Hello " + newUserMention + ", Welcome to " + channel + ". \n\nPlease PM me @" + process.env.BOT_USERNAME + " to find out all needed information about our service before asking an admin or posting in here.\n\nIf you do ask questions, and its obvious you have not spoken to me, you will be booted from the room. This is IPTV, admins don't have time for hand holding.!!!", { parse_mode: "HTML" });
-    logger.info("ID - " + msg.new_chat_member.id + " First Name - " + msg.new_chat_member.first_name + " joined the group");
+    bot_welcome.welcomeMessage(bot, msg, logger)
 });
 
 bot.on('message', (msg) => {
-
     // Listen call for "help"
-    const help = "help";
-    if (msg.text && msg.text.toString().toLowerCase().includes(help)) {
-        const userMention = "<a href=\"tg:\/\/user?id=" + msg.from.id + "\">@" + msg.from.first_name + "<\/a>"
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked for help");
-        bot.sendMessage(msg.chat.id, "Hello " + userMention + " please PM me @" + process.env.BOT_USERNAME + " and i'll try to help.", { parse_mode: "HTML" });
-    }
+    bot_chat.help(bot, msg, logger)
+    // listen for "filelinked code"
+    bot_chat.filelinked_help(bot, msg, logger)
+    // listen for "bye"
+    bot_chat.bye(bot, msg, logger)
+    // listen for "thank you BOT"
+    bot_chat.thankYou(bot, msg, logger, name)
+    // listen for "i love you BOT"
+    bot_chat.iLoveYou(bot, msg, logger, name)
+    // listen for "deal"
+    bot_chat.loveADeal(bot, msg, logger)
+    // listen for "football today"
+    bot_football.gamesToday(bot, msg, logger)
+    // listen for "BOT tell me a joke"
+    bot_joke.tellMe(bot, msg, logger, name)
+    // listen for "you there BOT"
+    bot_chat.youThere(bot, msg, logger, name)
+    // listen for "fuck off BOT"
+    bot_chat.fOff(bot, msg, logger, name)
+    // listen for "what sub should i buy?"
+    bot_questions.whatSubShouldIBuy(bot, msg, logger)
 
-    const help_filelinked = "filelinked code";
-    if (msg.text && msg.text.toString().toLowerCase().includes(help_filelinked)) {
-        const userMention = "<a href=\"tg:\/\/user?id=" + msg.from.id + "\">@" + msg.from.first_name + "<\/a>"
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked for fileLinked code");
-        bot.sendMessage(msg.chat.id, "Hello " + userMention + " please PM me @" + process.env.BOT_USERNAME + " and i'll give you the code", { parse_mode: "HTML" });
-    }
+    bot_faq_subscriptions.prices(bot, msg, logger)
+    
+    
 
-    const bye = "bye";
-    if (msg.text && msg.text.toString().toLowerCase().includes(bye)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said bye");
-        bot.sendMessage(msg.chat.id, "Bye " + msg.from.first_name + ", Hope to see you again.");
-    }
+ 
 
-    const love = "i love you ";
-    const lovePlus = love + name.toLowerCase()
-    if (msg.text && msg.text.toString().toLowerCase().includes(lovePlus)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said they loved me");
-        bot.sendMessage(msg.chat.id, "I love you too " + msg.from.first_name);
-    }
+   
 
-    const thankYou = "thank you " + name.toLowerCase();
-    if (msg.text && msg.text.toString().toLowerCase().includes(thankYou)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said thank you");
-        bot.sendMessage(msg.chat.id, "You're welcome " + msg.from.first_name);
-    }
+   
 
-    const footballToday = "football today";
-    if (msg.text && msg.text.toString().toLowerCase().includes(footballToday)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " asked for football today");
 
-        var options = {
-            method: 'GET',
-            url: 'https://football-pro.p.rapidapi.com/api/v2.0/livescores',
-            qs: { tz: 'Europe/London', leagues: '8', include: 'localTeam,visitorTeam' },
-            headers: {
-                'x-rapidapi-host': 'football-pro.p.rapidapi.com',
-                'x-rapidapi-key': process.env.RAPIDAPI_API_KEY,
-                useQueryString: true
-            },
-            ttl: 18000000 //5 hours
-        };
 
-        cachedRequest(options, function (error, response, body) {
-            // console.log(response)
-            if (error) throw new Error(error);
-
-            // console.log(body);
-            let jsonBody = JSON.parse(body)
-            if (jsonBody.data.length > 0) {
-                bot.sendMessage(msg.chat.id, 'Yes there is!').then(() => {
-                    return jsonBody.data.forEach(function (entry) {
-                        var homeTeam = entry.localTeam.data.name
-                        var awayTeam = entry.visitorTeam.data.name
-                        var startTime = entry.time.starting_at.time
-                        // console.log(entry);
-                        bot.sendMessage(msg.chat.id, homeTeam + " VS " + awayTeam + " @ " + startTime)
-                    });
-                }).then(() => {
-                    return bot.sendMessage(msg.chat.id, 'To see what channels the football is streaming on please join @footballontv')
-                })
-            } else {
-                bot.sendMessage(msg.chat.id, 'Sadly there is no football today :(')
-            }
-        })
-    }
-
-    const joke = name.toLowerCase() + " tell me a joke";
-    if (msg.text && msg.text.toString().toLowerCase().includes(joke)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " asked for a joke");
-
-        var options = {
-            method: 'GET',
-            url: 'https://joke3.p.rapidapi.com/v1/joke',
-            // qs: { tz: 'Europe/London', leagues: '8', include: 'localTeam,visitorTeam' },
-            headers: {
-                'x-rapidapi-host': 'joke3.p.rapidapi.com',
-                'x-rapidapi-key': process.env.RAPIDAPI_API_KEY,
-                useQueryString: true
-            },
-            // ttl: 18000 //5 hours
-        };
-
-        request(options, function (error, response, body) {
-            // console.log(response)
-
-            if (error) throw new Error(error);
-            let jsonBody = JSON.parse(body)
-            bot.sendMessage(msg.chat.id, jsonBody.content)
-        }
-        )
-    }
-
-    const youThere = "you there " + name.toLowerCase() + "?";
-    if (msg.text && msg.text.toString().toLowerCase().includes(youThere)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " asked if im there");
-        bot.sendMessage(msg.chat.id, "Always...");
-    }
-
-    const fuuk = "fuck off ";
-    const fuuckPlus = fuuk + name.toLowerCase()
-    if (msg.text && msg.text.toString().toLowerCase().includes(fuuckPlus)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " told me to fuck off");
-        bot.sendMessage(msg.chat.id, "Fuck off yourself " + msg.from.first_name + "!");
-    }
-
-    const whatSubShouldIBuy = "what sub should i buy?"
-    const subs = ["VIP!", "Premium Plus!", "Old Premium!", "Gold!", "Bronze!", "New Premium!", "KDB!", "Technoid!", "Bluemoon!", "SOL!", "Gambler!", "All of em!"]
-    if (msg.text && msg.text.toString().toLowerCase().includes(whatSubShouldIBuy)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked what sub to buy");
-        const randomSub = subs[Math.floor(Math.random() * subs.length)];
-        bot.sendMessage(msg.chat.id, randomSub);
-    }
-
-    const deal = "deal";
-    // const me = 434187971
-    // const sarah = 868225940
-    // const MANC = 470861863
-    if (msg.text && msg.text.toString().toLowerCase().match(/\bdeal\b/)) {
-        logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said we got a deal!");
-        bot.sendMessage(msg.chat.id, "I LOVE it when " + msg.from.first_name + ", does a deal :)");
-    }
-
-    const subPrice = "- subscription prices";
-    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, "PREMIUM PLUS ----£30\nVIP-----------------------£25\nOLD PREMIUM -----£17\nBLUEMOON ---------£15\nKDB --------------------£14\nGOLD ------------------£13\nTECHNOID -----------£13\nBRONZE --------------£10\nSOL ---------------------£10")
-            .then(() => {
-                return bot.sendMessage(msg.chat.id, "All of these prices are for 12 Month subscription subs").then(() => {
-                    return bot.sendMessage(msg.chat.id, "Keep an eye out though because we offer special deals on different subs from time to time.")
-                })
-            })
-    }
+   
 
     const howToSignUp = "- how to get a subscription?";
     if (msg.text && msg.text.toString().toLowerCase() === howToSignUp) {
diff --git a/data/bot/chat.js b/data/bot/chat.js
new file mode 100644
index 0000000..b5a9380
--- /dev/null
+++ b/data/bot/chat.js
@@ -0,0 +1,63 @@
+module.exports = {
+    help: (bot, msg, logger) => {
+        const help = "help";
+        if (msg.text && msg.text.toString().toLowerCase().includes(help)) {
+            const userMention = "<a href=\"tg:\/\/user?id=" + msg.from.id + "\">@" + msg.from.first_name + "<\/a>"
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked for help");
+            bot.sendMessage(msg.chat.id, "Hello " + userMention + " please PM me @" + process.env.BOT_USERNAME + " and i'll try to help.", { parse_mode: "HTML" });
+        }
+    },
+    filelinked_help: (bot, msg, logger) => {
+        const help_filelinked = "filelinked code";
+        if (msg.text && msg.text.toString().toLowerCase().includes(help_filelinked)) {
+            const userMention = "<a href=\"tg:\/\/user?id=" + msg.from.id + "\">@" + msg.from.first_name + "<\/a>"
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked for fileLinked code");
+            bot.sendMessage(msg.chat.id, "Hello " + userMention + " please PM me @" + process.env.BOT_USERNAME + " and i'll give you the code", { parse_mode: "HTML" });
+        }
+    },
+    bye: (bot, msg, logger) => {
+        const bye = "bye";
+        if (msg.text && msg.text.toString().toLowerCase().includes(bye)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said bye");
+            bot.sendMessage(msg.chat.id, "Bye " + msg.from.first_name + ", Hope to see you again.");
+        }
+    },
+    iLoveYou: (bot, msg, logger, name) => {
+        const love = "i love you ";
+        const lovePlus = love + name.toLowerCase()
+        if (msg.text && msg.text.toString().toLowerCase().includes(lovePlus)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said they loved me");
+            bot.sendMessage(msg.chat.id, "I love you too " + msg.from.first_name);
+        }
+    },
+    thankYou: (bot, msg, logger, name) => {
+        const thankYou = "thank you " + name.toLowerCase();
+        if (msg.text && msg.text.toString().toLowerCase().includes(thankYou)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said thank you");
+            bot.sendMessage(msg.chat.id, "You're welcome " + msg.from.first_name);
+        }
+    },
+    youThere: (bot, msg, logger, name) => {
+        const youThere = "you there " + name.toLowerCase() + "?";
+        if (msg.text && msg.text.toString().toLowerCase().includes(youThere)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " asked if im there");
+            bot.sendMessage(msg.chat.id, "Always...");
+        }
+    },
+    fOff: (bot, msg, logger, name) => {
+        const fuuk = "fuck off ";
+        const fuuckPlus = fuuk + name.toLowerCase()
+        if (msg.text && msg.text.toString().toLowerCase().includes(fuuckPlus)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " told me to fuck off");
+            bot.sendMessage(msg.chat.id, "Fuck off yourself " + msg.from.first_name + "!");
+        }
+    },
+    loveADeal: (bot, msg, logger) => {
+        const deal = "deal";
+        if (msg.text && msg.text.toString().toLowerCase().match(/\bdeal\b/)) {
+            if (msg)
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Said we got a deal!");
+            bot.sendMessage(msg.chat.id, "I LOVE it when " + msg.from.first_name + ", does a deal :)");
+        }
+    }
+};
\ No newline at end of file
diff --git a/data/bot/faq/subscriptions.js b/data/bot/faq/subscriptions.js
new file mode 100644
index 0000000..e424240
--- /dev/null
+++ b/data/bot/faq/subscriptions.js
@@ -0,0 +1,38 @@
+const fs = require('fs');
+const {table} = require('table')
+const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
+const t = require('obj-array-table')
+const nodeHtmlToImage = require('node-html-to-image')
+
+var arrayToTable = require('array-to-table')
+
+
+module.exports = {
+    prices: (bot, msg, logger) => {
+        const subPrice = "- subscription prices";
+        if (msg.text && msg.text.toString().toLowerCase() === subPrice) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Got subscription Prices");
+
+            
+            let test = arrayToTable(subs)
+
+            let t = "<pre>" + test + "</pre>"
+
+            nodeHtmlToImage({
+                output: './image.png',
+                html: t
+              })
+
+            bot.sendMessage(msg.chat.id, 
+            `First Header  | Second Header
+            ------------- | -------------
+            Content Cell  | Content Cell
+            Content Cell  | Content Cell`, { parse_mode: "Markdown" })
+                .then(() => {
+                    return bot.sendMessage(msg.chat.id, "All of these prices are for 12 Month subscription subs").then(() => {
+                        return bot.sendMessage(msg.chat.id, "Keep an eye out though because we offer special deals on different subs from time to time.")
+                    })
+                })
+        }
+    }
+}
\ No newline at end of file
diff --git a/data/bot/questions.js b/data/bot/questions.js
new file mode 100644
index 0000000..0940ec2
--- /dev/null
+++ b/data/bot/questions.js
@@ -0,0 +1,14 @@
+const fs = require('fs');
+
+module.exports = {
+    whatSubShouldIBuy: (bot, msg, logger) => {
+        const whatSubShouldIBuy = "what sub should i buy"
+        const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
+
+        if (msg.text && msg.text.toString().toLowerCase().includes(whatSubShouldIBuy)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked what sub to buy");
+            const randomSub = subs[Math.floor(Math.random() * subs.length)];
+            bot.sendMessage(msg.chat.id, randomSub.SUB + "!");
+        }
+    }
+}
\ No newline at end of file
diff --git a/data/bot/requests/football.js b/data/bot/requests/football.js
new file mode 100644
index 0000000..a720040
--- /dev/null
+++ b/data/bot/requests/football.js
@@ -0,0 +1,47 @@
+module.exports = {
+    gamesToday: (bot, msg, logger) => {
+        const footballToday = "football today";
+        if (msg.text && msg.text.toString().toLowerCase().includes(footballToday)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " asked for football today");
+
+            var options = {
+                method: 'GET',
+                url: 'https://football-pro.p.rapidapi.com/api/v2.0/livescores',
+                qs: { tz: 'Europe/London', leagues: '8', include: 'localTeam,visitorTeam' },
+                headers: {
+                    'x-rapidapi-host': 'football-pro.p.rapidapi.com',
+                    'x-rapidapi-key': process.env.RAPIDAPI_API_KEY,
+                    useQueryString: true
+                },
+                ttl: 18000000 //5 hours
+            };
+
+            cachedRequest(options, function (error, response, body) {
+                // console.log(response)
+                if (error) throw new Error(error);
+
+                // console.log(body);
+                let jsonBody = JSON.parse(body)
+                if (jsonBody.data.length > 0) {
+                    bot.sendMessage(msg.chat.id, 'Yes there is!').then(() => {
+                        return jsonBody.data.forEach(function (entry) {
+                            var homeTeam = entry.localTeam.data.name
+                            var awayTeam = entry.visitorTeam.data.name
+                            var startTime = entry.time.starting_at.time
+                            // console.log(entry);
+                            bot.sendMessage(msg.chat.id, homeTeam + " VS " + awayTeam + " @ " + startTime)
+                        });
+                    }).then(() => {
+                        return bot.sendMessage(msg.chat.id, 'To see what channels the football is streaming on please join @footballontv')
+                    })
+                } else {
+                    bot.sendMessage(msg.chat.id, 'Sadly there is no football today :(')
+                }
+            })
+        }
+
+
+
+
+    }
+}
\ No newline at end of file
diff --git a/data/bot/requests/joke.js b/data/bot/requests/joke.js
new file mode 100644
index 0000000..a7d2ffb
--- /dev/null
+++ b/data/bot/requests/joke.js
@@ -0,0 +1,30 @@
+module.exports = {
+    tellMe: (bot, msg, logger, name) => {
+        const joke = name.toLowerCase() + " tell me a joke";
+        if (msg.text && msg.text.toString().toLowerCase().includes(joke)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " asked for a joke");
+
+            var options = {
+                method: 'GET',
+                url: 'https://joke3.p.rapidapi.com/v1/joke',
+                // qs: { tz: 'Europe/London', leagues: '8', include: 'localTeam,visitorTeam' },
+                headers: {
+                    'x-rapidapi-host': 'joke3.p.rapidapi.com',
+                    'x-rapidapi-key': process.env.RAPIDAPI_API_KEY,
+                    useQueryString: true
+                },
+                // ttl: 18000 //5 hours
+            };
+
+            request(options, function (error, response, body) {
+                // console.log(response)
+
+                if (error) throw new Error(error);
+                let jsonBody = JSON.parse(body)
+                bot.sendMessage(msg.chat.id, jsonBody.content)
+            }
+            )
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/data/bot/welcomeMesage.js b/data/bot/welcomeMesage.js
new file mode 100644
index 0000000..fa4c714
--- /dev/null
+++ b/data/bot/welcomeMesage.js
@@ -0,0 +1,7 @@
+module.exports = {
+    welcomeMessage: (bot, msg, logger) => {
+        const newUserMention = "<a href=\"tg:\/\/user?id=" + msg.new_chat_member.id + "\">@" + msg.new_chat_member.first_name + "<\/a>"
+        bot.sendMessage(msg.chat.id, "Hello " + newUserMention + ", Welcome to " + channel + ". \n\nPlease PM me @" + process.env.BOT_USERNAME + " to find out all needed information about our service before asking an admin or posting in here.\n\nIf you do ask questions, and its obvious you have not spoken to me, you will be booted from the room. This is IPTV, admins don't have time for hand holding.!!!", { parse_mode: "HTML" });
+        logger.info("ID - " + msg.new_chat_member.id + " First Name - " + msg.new_chat_member.first_name + " joined the group");
+    }
+};
\ No newline at end of file
diff --git a/data/group/subs.json b/data/group/subs.json
new file mode 100644
index 0000000..cd2ea12
--- /dev/null
+++ b/data/group/subs.json
@@ -0,0 +1,57 @@
+[
+    {
+      "SUB": "VIP",
+      "COST": 25,
+      "STATUS": 1
+    },
+    {
+      "SUB": "Premium Plus",
+      "COST": 30,
+      "STATUS": 1
+    },
+    {
+      "SUB": "Old Premium",
+      "COST": 17,
+      "STATUS": 1
+    },
+    {
+      "SUB": "Gold",
+      "COST": 13,
+      "STATUS": 1
+    },
+    {
+      "SUB": "Bronze",
+      "COST": 10,
+      "STATUS": 1
+    },
+    {
+      "SUB": "KDB",
+      "COST": 14,
+      "STATUS": 1
+    },
+    {
+      "SUB": "Technoid",
+      "COST": 13,
+      "STATUS": 1
+    },
+    {
+      "SUB": "Bluemoon",
+      "COST": 15,
+      "STATUS": 1
+    },
+    {
+      "SUB": "SOL",
+      "COST": 10,
+      "STATUS": "X"
+    },
+    {
+      "SUB": "Gambler",
+      "COST": "X",
+      "STATUS": 1
+    },
+    {
+      "SUB": "All of em",
+      "COST": "X",
+      "STATUS": "X"
+    }
+   ]
\ No newline at end of file
diff --git a/image.png b/image.png
new file mode 100644
index 0000000000000000000000000000000000000000..d109df2570b7be98c9328a8c3069c427cac09ea6
GIT binary patch
literal 10985
zcmeHtX;@R|x^}GHYMqc)L1j{OYgGiC02y12ID=AUCQ)QiW{@!iVrvnUB38uIBIGC{
zLI@Es1PCN$E~bzoVuYAPCJ{n_fFXoT=ULMI?Vi2QcU|ZFKK&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=cB4*tJcB-4$<Zh|EjL$ueeD_(g<48P{uTf}
zV29SKz`#H_@q+W>)(ERN?hEFt9YMuYcax<DFM+=V$cSTYuv?`EkV0W57i0pWzQXR`
zo66>vWC9Q*i243w1ulY3W!vVfN+`DgF$vBPK=Ey^O>(O_$gXB@1Omb9J&WMuQ@%Q7
zN*qA?OXqqn5~g9ZSK~Gam`Psm&&SVwxP(T7=>_f;&i?*HjyFV5LD0wudUj#xrhl@(
zMREx6h_jcr_Jp7=eV9WU*6jfnMQo6wRGfpDYeP7dhbI-rd1yxp6fP83g!AD(9F3O$
z7Y(qq4?!y3E?2bo`gd9W9>^hy-nO?;Aro<Wu8l>^S6N$~r#2qfYKKFOzKFHJTE@mu
z)dD6m3|NrTL1{nQvQ{?HjCGU>H7Wc}!r9Emxkk1~YbTWz_2KQ?4WI>mYyJZkJRD2-
zeZSQA8SDZ0x${4D!YED8bYE>3DKG{KYgk1nMwTit-4<(?_sge;0ZchUIo2*QGAb%+
zz%5_U1WXFNg!BjmHcKs~9#|1~Ddvang>Rr|Mb^<u7csf>HG!ngYlWsd^TBC2qrk9|
z>pCs1;51ptKJgMcBc4Ag{_oF=|Lm{-wdDM_!{xtT{O6<gzgFX~)%b7z(&67?>tC??
q3n_mg<u9bbpRD|!qk?kH;ykTV!-o;C;4l@1I(o<nU3%c$cmD~iNgdz-

literal 0
HcmV?d00001

diff --git a/lib/logger.js b/lib/logger.js
deleted file mode 100644
index 89e7605..0000000
--- a/lib/logger.js
+++ /dev/null
@@ -1,9 +0,0 @@
-let logger = require('perfect-logger');
- 
-// Configure Settings
-logger.initialize('FrontEndDriver', {
-    logLevelFile: 0,                    // Log level for file
-    logLevelConsole: 0,                 // Log level for STDOUT/STDERR
-    logDirectory: 'logs/',              // Log directory
-    customBannerHeaders: 'This is a custom banner'  // Custom Log Banner
-});
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 59bfa43..568de49 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4,6 +4,40 @@
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
+    "@types/mime-types": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.0.tgz",
+      "integrity": "sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM="
+    },
+    "abab": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz",
+      "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg=="
+    },
+    "acorn": {
+      "version": "6.4.1",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
+      "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA=="
+    },
+    "acorn-globals": {
+      "version": "4.3.4",
+      "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz",
+      "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==",
+      "requires": {
+        "acorn": "^6.0.1",
+        "acorn-walk": "^6.0.1"
+      }
+    },
+    "acorn-walk": {
+      "version": "6.2.0",
+      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz",
+      "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA=="
+    },
+    "agent-base": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz",
+      "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g=="
+    },
     "ajv": {
       "version": "6.12.2",
       "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
@@ -15,6 +49,29 @@
         "uri-js": "^4.2.2"
       }
     },
+    "ansi-regex": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+      "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
+    },
+    "ansi-styles": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+      "requires": {
+        "color-convert": "^1.9.0"
+      }
+    },
+    "array-equal": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
+      "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM="
+    },
+    "array-to-table": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/array-to-table/-/array-to-table-1.0.1.tgz",
+      "integrity": "sha1-XfqUCRFRivK9idx9YF3PuTNXVf4="
+    },
     "array.prototype.findindex": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/array.prototype.findindex/-/array.prototype.findindex-2.1.0.tgz",
@@ -37,10 +94,15 @@
       "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
       "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
     },
-    "assertion-error": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
-      "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw=="
+    "astral-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
+      "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg=="
+    },
+    "async-limiter": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+      "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
     },
     "asynckit": {
       "version": "0.4.0",
@@ -57,6 +119,11 @@
       "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz",
       "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA=="
     },
+    "balanced-match": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+    },
     "bcrypt-pbkdf": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
@@ -79,6 +146,30 @@
       "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
       "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
     },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "requires": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "browser-process-hrtime": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
+      "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
+    },
+    "buffer-crc32": {
+      "version": "0.2.13",
+      "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+      "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI="
+    },
+    "buffer-from": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
+    },
     "cached-request": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/cached-request/-/cached-request-2.0.1.tgz",
@@ -93,20 +184,18 @@
       "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
       "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
     },
-    "chai": {
-      "version": "3.5.0",
-      "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
-      "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=",
+    "color-convert": {
+      "version": "1.9.3",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
       "requires": {
-        "assertion-error": "^1.0.1",
-        "deep-eql": "^0.1.3",
-        "type-detect": "^1.0.0"
+        "color-name": "1.1.3"
       }
     },
-    "clone": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
-      "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
+    "color-name": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
     },
     "combined-stream": {
       "version": "1.0.8",
@@ -116,16 +205,40 @@
         "delayed-stream": "~1.0.0"
       }
     },
-    "commander": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz",
-      "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM="
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+    },
+    "concat-stream": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+      "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+      "requires": {
+        "buffer-from": "^1.0.0",
+        "inherits": "^2.0.3",
+        "readable-stream": "^2.2.2",
+        "typedarray": "^0.0.6"
+      }
     },
     "core-util-is": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
       "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
     },
+    "cssom": {
+      "version": "0.3.8",
+      "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
+      "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
+    },
+    "cssstyle": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz",
+      "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==",
+      "requires": {
+        "cssom": "0.3.x"
+      }
+    },
     "dashdash": {
       "version": "1.14.1",
       "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
@@ -134,6 +247,21 @@
         "assert-plus": "^1.0.0"
       }
     },
+    "data-urls": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz",
+      "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==",
+      "requires": {
+        "abab": "^2.0.0",
+        "whatwg-mimetype": "^2.2.0",
+        "whatwg-url": "^7.0.0"
+      }
+    },
+    "dateformat-nodep": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/dateformat-nodep/-/dateformat-nodep-1.0.0.tgz",
+      "integrity": "sha1-gdWXuDY6hgDJNqwqn82sioHM8pU="
+    },
     "debug": {
       "version": "3.2.6",
       "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
@@ -142,20 +270,10 @@
         "ms": "^2.1.1"
       }
     },
-    "deep-eql": {
+    "deep-is": {
       "version": "0.1.3",
-      "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
-      "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
-      "requires": {
-        "type-detect": "0.1.1"
-      },
-      "dependencies": {
-        "type-detect": {
-          "version": "0.1.1",
-          "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
-          "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI="
-        }
-      }
+      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+      "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
     },
     "define-properties": {
       "version": "1.1.3",
@@ -175,10 +293,13 @@
       "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
       "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
     },
-    "diff": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
-      "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8="
+    "domexception": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
+      "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==",
+      "requires": {
+        "webidl-conversions": "^4.0.2"
+      }
     },
     "dotenv": {
       "version": "8.2.0",
@@ -194,6 +315,11 @@
         "safer-buffer": "^2.1.0"
       }
     },
+    "emoji-regex": {
+      "version": "7.0.3",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+      "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
+    },
     "end-of-stream": {
       "version": "1.4.4",
       "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
@@ -230,10 +356,32 @@
         "is-symbol": "^1.0.2"
       }
     },
-    "escape-string-regexp": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
-      "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE="
+    "escodegen": {
+      "version": "1.14.3",
+      "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
+      "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
+      "requires": {
+        "esprima": "^4.0.1",
+        "estraverse": "^4.2.0",
+        "esutils": "^2.0.2",
+        "optionator": "^0.8.1",
+        "source-map": "~0.6.1"
+      }
+    },
+    "esprima": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
+    },
+    "estraverse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="
+    },
+    "esutils": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+      "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
     },
     "eventemitter3": {
       "version": "3.1.2",
@@ -245,6 +393,45 @@
       "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
       "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
     },
+    "extract-zip": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",
+      "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",
+      "requires": {
+        "concat-stream": "^1.6.2",
+        "debug": "^2.6.9",
+        "mkdirp": "^0.5.4",
+        "yauzl": "^2.10.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "minimist": {
+          "version": "1.2.5",
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+          "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+        },
+        "mkdirp": {
+          "version": "0.5.5",
+          "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+          "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+        }
+      }
+    },
     "extsprintf": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
@@ -260,6 +447,19 @@
       "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
       "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
     },
+    "fast-levenshtein": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+      "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
+    },
+    "fd-slicer": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+      "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
+      "requires": {
+        "pend": "~1.2.0"
+      }
+    },
     "file-type": {
       "version": "3.9.0",
       "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
@@ -285,6 +485,11 @@
       "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
       "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
     },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+    },
     "function-bind": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -299,12 +504,16 @@
       }
     },
     "glob": {
-      "version": "3.2.11",
-      "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
-      "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
+      "version": "7.1.6",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+      "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
       "requires": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
         "inherits": "2",
-        "minimatch": "0.3"
+        "minimatch": "^3.0.4",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
       }
     },
     "graceful-fs": {
@@ -312,10 +521,24 @@
       "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
       "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
     },
-    "growl": {
-      "version": "1.9.2",
-      "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz",
-      "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8="
+    "handlebars": {
+      "version": "4.7.6",
+      "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz",
+      "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==",
+      "requires": {
+        "minimist": "^1.2.5",
+        "neo-async": "^2.6.0",
+        "source-map": "^0.6.1",
+        "uglify-js": "^3.1.4",
+        "wordwrap": "^1.0.0"
+      },
+      "dependencies": {
+        "minimist": {
+          "version": "1.2.5",
+          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+          "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+        }
+      }
     },
     "har-schema": {
       "version": "2.0.0",
@@ -344,6 +567,22 @@
       "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
       "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
     },
+    "html-encoding-sniffer": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
+      "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
+      "requires": {
+        "whatwg-encoding": "^1.0.1"
+      }
+    },
+    "html-table-builder": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/html-table-builder/-/html-table-builder-1.0.1.tgz",
+      "integrity": "sha512-EsiCh68c+BILvp61ooxEgPClXOvPGu0/xaJfZ6Dri7lFoB0xt/GMTxOSGeq4m25WIwS+NfiLjeye/kqhux9BZg==",
+      "requires": {
+        "jsdom": "^13.0.0"
+      }
+    },
     "http-signature": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
@@ -354,20 +593,47 @@
         "sshpk": "^1.7.0"
       }
     },
+    "https-proxy-agent": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz",
+      "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==",
+      "requires": {
+        "agent-base": "5",
+        "debug": "4"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        }
+      }
+    },
+    "iconv-lite": {
+      "version": "0.4.24",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+      "requires": {
+        "safer-buffer": ">= 2.1.2 < 3"
+      }
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+      "requires": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
     "inherits": {
       "version": "2.0.4",
       "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
       "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
     },
-    "is-absolute": {
-      "version": "0.2.6",
-      "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz",
-      "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=",
-      "requires": {
-        "is-relative": "^0.2.1",
-        "is-windows": "^0.2.0"
-      }
-    },
     "is-callable": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz",
@@ -378,6 +644,11 @@
       "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
       "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g=="
     },
+    "is-fullwidth-code-point": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+      "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
+    },
     "is-regex": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz",
@@ -386,14 +657,6 @@
         "has-symbols": "^1.0.1"
       }
     },
-    "is-relative": {
-      "version": "0.2.1",
-      "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz",
-      "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=",
-      "requires": {
-        "is-unc-path": "^0.1.1"
-      }
-    },
     "is-symbol": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
@@ -407,19 +670,6 @@
       "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
       "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
     },
-    "is-unc-path": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz",
-      "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=",
-      "requires": {
-        "unc-path-regex": "^0.1.0"
-      }
-    },
-    "is-windows": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz",
-      "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw="
-    },
     "isarray": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -430,32 +680,44 @@
       "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
       "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
     },
-    "jade": {
-      "version": "0.26.3",
-      "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz",
-      "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=",
-      "requires": {
-        "commander": "0.6.1",
-        "mkdirp": "0.3.0"
-      },
-      "dependencies": {
-        "commander": {
-          "version": "0.6.1",
-          "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
-          "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY="
-        },
-        "mkdirp": {
-          "version": "0.3.0",
-          "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz",
-          "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4="
-        }
-      }
-    },
     "jsbn": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
       "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
     },
+    "jsdom": {
+      "version": "13.2.0",
+      "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.2.0.tgz",
+      "integrity": "sha512-cG1NtMWO9hWpqRNRR3dSvEQa8bFI6iLlqU2x4kwX51FQjp0qus8T9aBaAO6iGp3DeBrhdwuKxckknohkmfvsFw==",
+      "requires": {
+        "abab": "^2.0.0",
+        "acorn": "^6.0.4",
+        "acorn-globals": "^4.3.0",
+        "array-equal": "^1.0.0",
+        "cssom": "^0.3.4",
+        "cssstyle": "^1.1.1",
+        "data-urls": "^1.1.0",
+        "domexception": "^1.0.1",
+        "escodegen": "^1.11.0",
+        "html-encoding-sniffer": "^1.0.2",
+        "nwsapi": "^2.0.9",
+        "parse5": "5.1.0",
+        "pn": "^1.1.0",
+        "request": "^2.88.0",
+        "request-promise-native": "^1.0.5",
+        "saxes": "^3.1.5",
+        "symbol-tree": "^3.2.2",
+        "tough-cookie": "^2.5.0",
+        "w3c-hr-time": "^1.0.1",
+        "w3c-xmlserializer": "^1.0.1",
+        "webidl-conversions": "^4.0.2",
+        "whatwg-encoding": "^1.0.5",
+        "whatwg-mimetype": "^2.3.0",
+        "whatwg-url": "^7.0.0",
+        "ws": "^6.1.2",
+        "xml-name-validator": "^3.0.0"
+      }
+    },
     "json-schema": {
       "version": "0.2.3",
       "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
@@ -482,15 +744,24 @@
         "verror": "1.10.0"
       }
     },
+    "levn": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+      "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+      "requires": {
+        "prelude-ls": "~1.1.2",
+        "type-check": "~0.3.2"
+      }
+    },
     "lodash": {
       "version": "4.17.15",
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
       "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
     },
-    "lru-cache": {
-      "version": "2.7.3",
-      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
-      "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI="
+    "lodash.sortby": {
+      "version": "4.7.0",
+      "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
+      "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
     },
     "mime": {
       "version": "1.6.0",
@@ -511,12 +782,11 @@
       }
     },
     "minimatch": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
-      "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
       "requires": {
-        "lru-cache": "2",
-        "sigmund": "~1.0.0"
+        "brace-expansion": "^1.1.7"
       }
     },
     "minimist": {
@@ -532,59 +802,23 @@
         "minimist": "0.0.8"
       }
     },
-    "mocha": {
-      "version": "2.5.3",
-      "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz",
-      "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=",
-      "requires": {
-        "commander": "2.3.0",
-        "debug": "2.2.0",
-        "diff": "1.4.0",
-        "escape-string-regexp": "1.0.2",
-        "glob": "3.2.11",
-        "growl": "1.9.2",
-        "jade": "0.26.3",
-        "mkdirp": "0.5.1",
-        "supports-color": "1.2.0",
-        "to-iso-string": "0.0.2"
-      },
-      "dependencies": {
-        "debug": {
-          "version": "2.2.0",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
-          "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
-          "requires": {
-            "ms": "0.7.1"
-          }
-        },
-        "ms": {
-          "version": "0.7.1",
-          "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
-          "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
-        }
-      }
-    },
     "ms": {
       "version": "2.1.2",
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
       "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
     },
-    "node-cache": {
-      "version": "5.1.1",
-      "resolved": "https://registry.npmjs.org/node-cache/-/node-cache-5.1.1.tgz",
-      "integrity": "sha512-bJ9nH25Z51HG2QIu66K4dMVyMs6o8bNQpviDnXzG+O/gfNxPU9IpIig0j4pzlO707GcGZ6QA4rWhlRxjJsjnZw==",
-      "requires": {
-        "clone": "2.x"
-      }
+    "neo-async": {
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
+      "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw=="
     },
-    "node-persist": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/node-persist/-/node-persist-2.1.0.tgz",
-      "integrity": "sha1-5lK784haBNrWo1PXQXYXfIORRwc=",
+    "node-html-to-image": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/node-html-to-image/-/node-html-to-image-2.1.1.tgz",
+      "integrity": "sha512-uGWjYeXM1V4DWAWQsmC99KcgnrE82jVHtGzLvN53BadqcovaJOe/5NwBMbn+7k28xrPNEuwbvda0jGv/DvMEwQ==",
       "requires": {
-        "is-absolute": "^0.2.6",
-        "mkdirp": "~0.5.1",
-        "q": "~1.1.1"
+        "handlebars": "^4.5.3",
+        "puppeteer": "^2.0.0"
       }
     },
     "node-telegram-bot-api": {
@@ -605,11 +839,31 @@
         "request-promise": "^4.2.2"
       }
     },
+    "numeral": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz",
+      "integrity": "sha1-StCAk21EPCVhrtnyGX7//iX05QY="
+    },
+    "nwsapi": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
+      "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ=="
+    },
     "oauth-sign": {
       "version": "0.9.0",
       "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
       "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
     },
+    "obj-array-table": {
+      "version": "1.0.17",
+      "resolved": "https://registry.npmjs.org/obj-array-table/-/obj-array-table-1.0.17.tgz",
+      "integrity": "sha512-kPdSI2Y9JYYQBuB0PQLiHgKejQMmMYi7jlfNqp1WEQtCRJaTiPtBLxHr4ULHMoEqAQGN0yBSYZMEQC56B9L8kw==",
+      "requires": {
+        "dateformat-nodep": "^1.0.0",
+        "lodash": "^4.16.4",
+        "numeral": "^2.0.6"
+      }
+    },
     "object-inspect": {
       "version": "1.8.0",
       "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz",
@@ -639,15 +893,34 @@
         "wrappy": "1"
       }
     },
-    "path": {
-      "version": "0.12.7",
-      "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
-      "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+    "optionator": {
+      "version": "0.8.3",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+      "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
       "requires": {
-        "process": "^0.11.1",
-        "util": "^0.10.3"
+        "deep-is": "~0.1.3",
+        "fast-levenshtein": "~2.0.6",
+        "levn": "~0.3.0",
+        "prelude-ls": "~1.1.2",
+        "type-check": "~0.3.2",
+        "word-wrap": "~1.2.3"
       }
     },
+    "parse5": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz",
+      "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ=="
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+    },
+    "pend": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+      "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
+    },
     "perfect-logger": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/perfect-logger/-/perfect-logger-2.0.1.tgz",
@@ -658,16 +931,31 @@
       "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
       "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
     },
-    "process": {
-      "version": "0.11.10",
-      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
-      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
+    "pn": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
+      "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA=="
+    },
+    "prelude-ls": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+      "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
     },
     "process-nextick-args": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
       "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
     },
+    "progress": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+      "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
+    },
+    "proxy-from-env": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
+    },
     "psl": {
       "version": "1.8.0",
       "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
@@ -687,27 +975,43 @@
       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
     },
-    "q": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/q/-/q-1.1.2.tgz",
-      "integrity": "sha1-Y1fikSBnAdmfGXq4TlforRlvKok="
+    "puppeteer": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.1.1.tgz",
+      "integrity": "sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==",
+      "requires": {
+        "@types/mime-types": "^2.1.0",
+        "debug": "^4.1.0",
+        "extract-zip": "^1.6.6",
+        "https-proxy-agent": "^4.0.0",
+        "mime": "^2.0.3",
+        "mime-types": "^2.1.25",
+        "progress": "^2.0.1",
+        "proxy-from-env": "^1.0.0",
+        "rimraf": "^2.6.1",
+        "ws": "^6.1.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "mime": {
+          "version": "2.4.6",
+          "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
+          "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA=="
+        }
+      }
     },
     "qs": {
       "version": "6.5.2",
       "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
       "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
     },
-    "rapidapi-connect": {
-      "version": "0.0.6",
-      "resolved": "https://registry.npmjs.org/rapidapi-connect/-/rapidapi-connect-0.0.6.tgz",
-      "integrity": "sha512-uOCBZUhnUVeWFHbwqIhUSV21bAzRfy7GaTxKnW8p6C5dfy5BhmeSWCZftm0uQ/HxSBjRwyWQ4lqDMoZuiCptmQ==",
-      "requires": {
-        "chai": "^3.5.0",
-        "mocha": "^2.5.3",
-        "request": "^2.72.0",
-        "ws": "^2.1.0"
-      }
-    },
     "readable-stream": {
       "version": "2.3.7",
       "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
@@ -775,6 +1079,29 @@
         "lodash": "^4.17.15"
       }
     },
+    "request-promise-native": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz",
+      "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==",
+      "requires": {
+        "request-promise-core": "1.1.3",
+        "stealthy-require": "^1.1.1",
+        "tough-cookie": "^2.3.3"
+      }
+    },
+    "require-dir": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/require-dir/-/require-dir-1.2.0.tgz",
+      "integrity": "sha512-LY85DTSu+heYgDqq/mK+7zFHWkttVNRXC9NKcKGyuGLdlsfbjEPrIEYdCVrx6hqnJb+xSu3Lzaoo8VnmOhhjNA=="
+    },
+    "rimraf": {
+      "version": "2.7.1",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+      "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+      "requires": {
+        "glob": "^7.1.3"
+      }
+    },
     "safe-buffer": {
       "version": "5.2.1",
       "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -785,10 +1112,28 @@
       "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
       "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
     },
-    "sigmund": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
-      "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA="
+    "saxes": {
+      "version": "3.1.11",
+      "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.11.tgz",
+      "integrity": "sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g==",
+      "requires": {
+        "xmlchars": "^2.1.1"
+      }
+    },
+    "slice-ansi": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
+      "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+      "requires": {
+        "ansi-styles": "^3.2.0",
+        "astral-regex": "^1.0.0",
+        "is-fullwidth-code-point": "^2.0.0"
+      }
+    },
+    "source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
     },
     "sshpk": {
       "version": "1.16.1",
@@ -811,6 +1156,16 @@
       "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
       "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
     },
+    "string-width": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+      "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+      "requires": {
+        "emoji-regex": "^7.0.1",
+        "is-fullwidth-code-point": "^2.0.0",
+        "strip-ansi": "^5.1.0"
+      }
+    },
     "string.prototype.trimend": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
@@ -844,21 +1199,35 @@
         }
       }
     },
-    "supports-color": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz",
-      "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4="
+    "strip-ansi": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+      "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+      "requires": {
+        "ansi-regex": "^4.1.0"
+      }
+    },
+    "symbol-tree": {
+      "version": "3.2.4",
+      "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
+      "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
+    },
+    "table": {
+      "version": "5.4.6",
+      "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
+      "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+      "requires": {
+        "ajv": "^6.10.2",
+        "lodash": "^4.17.14",
+        "slice-ansi": "^2.1.0",
+        "string-width": "^3.0.0"
+      }
     },
     "throttled-request": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/throttled-request/-/throttled-request-0.1.1.tgz",
       "integrity": "sha1-QUa3C3elrsozxGMyzxPrnHkelxs="
     },
-    "to-iso-string": {
-      "version": "0.0.2",
-      "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz",
-      "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE="
-    },
     "tough-cookie": {
       "version": "2.5.0",
       "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
@@ -868,6 +1237,14 @@
         "punycode": "^2.1.1"
       }
     },
+    "tr46": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz",
+      "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
+      "requires": {
+        "punycode": "^2.1.0"
+      }
+    },
     "tunnel-agent": {
       "version": "0.6.0",
       "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -881,20 +1258,24 @@
       "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
       "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
     },
-    "type-detect": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
-      "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI="
+    "type-check": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+      "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+      "requires": {
+        "prelude-ls": "~1.1.2"
+      }
     },
-    "ultron": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
-      "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
+    "typedarray": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+      "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
     },
-    "unc-path-regex": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
-      "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo="
+    "uglify-js": {
+      "version": "3.10.0",
+      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz",
+      "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==",
+      "optional": true
     },
     "uri-js": {
       "version": "4.2.2",
@@ -904,21 +1285,6 @@
         "punycode": "^2.1.0"
       }
     },
-    "util": {
-      "version": "0.10.4",
-      "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
-      "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
-      "requires": {
-        "inherits": "2.0.3"
-      },
-      "dependencies": {
-        "inherits": {
-          "version": "2.0.3",
-          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
-          "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
-        }
-      }
-    },
     "util-deprecate": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -939,25 +1305,92 @@
         "extsprintf": "^1.2.0"
       }
     },
+    "w3c-hr-time": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
+      "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
+      "requires": {
+        "browser-process-hrtime": "^1.0.0"
+      }
+    },
+    "w3c-xmlserializer": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz",
+      "integrity": "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==",
+      "requires": {
+        "domexception": "^1.0.1",
+        "webidl-conversions": "^4.0.2",
+        "xml-name-validator": "^3.0.0"
+      }
+    },
+    "webidl-conversions": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
+      "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg=="
+    },
+    "whatwg-encoding": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz",
+      "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==",
+      "requires": {
+        "iconv-lite": "0.4.24"
+      }
+    },
+    "whatwg-mimetype": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
+      "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g=="
+    },
+    "whatwg-url": {
+      "version": "7.1.0",
+      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz",
+      "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==",
+      "requires": {
+        "lodash.sortby": "^4.7.0",
+        "tr46": "^1.0.1",
+        "webidl-conversions": "^4.0.2"
+      }
+    },
+    "word-wrap": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="
+    },
+    "wordwrap": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+      "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
+    },
     "wrappy": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
       "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
     },
     "ws": {
-      "version": "2.3.1",
-      "resolved": "https://registry.npmjs.org/ws/-/ws-2.3.1.tgz",
-      "integrity": "sha1-a5Sz5EfLajY/eF6vlK9jWejoHIA=",
+      "version": "6.2.1",
+      "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
+      "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
       "requires": {
-        "safe-buffer": "~5.0.1",
-        "ultron": "~1.1.0"
-      },
-      "dependencies": {
-        "safe-buffer": {
-          "version": "5.0.1",
-          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz",
-          "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c="
-        }
+        "async-limiter": "~1.0.0"
+      }
+    },
+    "xml-name-validator": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
+      "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw=="
+    },
+    "xmlchars": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
+      "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
+    },
+    "yauzl": {
+      "version": "2.10.0",
+      "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
+      "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
+      "requires": {
+        "buffer-crc32": "~0.2.3",
+        "fd-slicer": "~1.1.0"
       }
     }
   }
diff --git a/package.json b/package.json
index 41e401e..46c2106 100644
--- a/package.json
+++ b/package.json
@@ -14,12 +14,18 @@
   "author": "",
   "license": "ISC",
   "dependencies": {
+    "array-to-table": "^1.0.1",
     "cached-request": "^2.0.1",
     "dotenv": "^8.2.0",
     "fs": "0.0.1-security",
+    "html-table-builder": "^1.0.1",
+    "node-html-to-image": "^2.1.1",
     "node-telegram-bot-api": "^0.50.0",
+    "obj-array-table": "^1.0.17",
     "perfect-logger": "^2.0.1",
     "request": "^2.88.2",
+    "require-dir": "^1.2.0",
+    "table": "^5.4.6",
     "throttled-request": "^0.1.1"
   }
 }

From b472bed57f40884e29f28f75fb8652326123784d Mon Sep 17 00:00:00 2001
From: "karl.hudgell" <karl.hudgell@bjss.com>
Date: Thu, 25 Jun 2020 20:51:12 +0100
Subject: [PATCH 3/7] keep going

---
 app.js                        |   5 ++---
 data/bot/faq/subscriptions.js |  37 ++++++++++------------------------
 image.png                     | Bin 10985 -> 0 bytes
 3 files changed, 13 insertions(+), 29 deletions(-)
 delete mode 100644 image.png

diff --git a/app.js b/app.js
index 67fcc07..4e9e5b2 100644
--- a/app.js
+++ b/app.js
@@ -16,7 +16,7 @@ const bot_welcome = require('./data/bot/welcomeMesage')
 const bot_questions = require('./data/bot/questions')
 const bot_football = require('./data/bot/requests/football')
 const bot_joke = require('./data/bot/requests/joke')
-const bot_faq_subscriptions = require('./data/bot/faq/subscriptions')
+const bot_faq_subscription = require('./data/bot/faq/subscriptions')
 
 const token = process.env.BOT_TOKEN;
 const name = process.env.BOT_NAME;
@@ -65,8 +65,7 @@ bot.on('message', (msg) => {
     // listen for "what sub should i buy?"
     bot_questions.whatSubShouldIBuy(bot, msg, logger)
 
-    bot_faq_subscriptions.prices(bot, msg, logger)
-    
+    bot_faq_subscription.prices(bot, msg, logger)
     
 
  
diff --git a/data/bot/faq/subscriptions.js b/data/bot/faq/subscriptions.js
index e424240..5f24301 100644
--- a/data/bot/faq/subscriptions.js
+++ b/data/bot/faq/subscriptions.js
@@ -1,33 +1,18 @@
-const fs = require('fs');
-const {table} = require('table')
-const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
-const t = require('obj-array-table')
-const nodeHtmlToImage = require('node-html-to-image')
-
-var arrayToTable = require('array-to-table')
-
-
 module.exports = {
     prices: (bot, msg, logger) => {
         const subPrice = "- subscription prices";
         if (msg.text && msg.text.toString().toLowerCase() === subPrice) {
             logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Got subscription Prices");
-
-            
-            let test = arrayToTable(subs)
-
-            let t = "<pre>" + test + "</pre>"
-
-            nodeHtmlToImage({
-                output: './image.png',
-                html: t
-              })
-
-            bot.sendMessage(msg.chat.id, 
-            `First Header  | Second Header
-            ------------- | -------------
-            Content Cell  | Content Cell
-            Content Cell  | Content Cell`, { parse_mode: "Markdown" })
+            bot.sendMessage(msg.chat.id, `
+            PREMIUM PLUS ----£30\n
+            VIP-----------------------£25\n
+            OLD PREMIUM -----£17\n
+            BLUEMOON ---------£15\n
+            KDB --------------------£14\n
+            GOLD ------------------£13\n
+            TECHNOID -----------£13\n
+            BRONZE --------------£10\n
+            SOL ---------------------£10`)
                 .then(() => {
                     return bot.sendMessage(msg.chat.id, "All of these prices are for 12 Month subscription subs").then(() => {
                         return bot.sendMessage(msg.chat.id, "Keep an eye out though because we offer special deals on different subs from time to time.")
@@ -35,4 +20,4 @@ module.exports = {
                 })
         }
     }
-}
\ No newline at end of file
+}
diff --git a/image.png b/image.png
deleted file mode 100644
index d109df2570b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 data/group/subs.json          | 112 +++++++++++++++++-----------------
 2 files changed, 71 insertions(+), 66 deletions(-)

diff --git a/data/bot/faq/subscriptions.js b/data/bot/faq/subscriptions.js
index 5f24301..f3094fc 100644
--- a/data/bot/faq/subscriptions.js
+++ b/data/bot/faq/subscriptions.js
@@ -1,18 +1,23 @@
+const fs = require('fs')
+const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
+
 module.exports = {
     prices: (bot, msg, logger) => {
         const subPrice = "- subscription prices";
         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, `
-            PREMIUM PLUS ----£30\n
-            VIP-----------------------£25\n
-            OLD PREMIUM -----£17\n
-            BLUEMOON ---------£15\n
-            KDB --------------------£14\n
-            GOLD ------------------£13\n
-            TECHNOID -----------£13\n
-            BRONZE --------------£10\n
-            SOL ---------------------£10`)
+            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}
+            `)
                 .then(() => {
                     return bot.sendMessage(msg.chat.id, "All of these prices are for 12 Month subscription subs").then(() => {
                         return bot.sendMessage(msg.chat.id, "Keep an eye out though because we offer special deals on different subs from time to time.")
diff --git a/data/group/subs.json b/data/group/subs.json
index cd2ea12..0cac5d1 100644
--- a/data/group/subs.json
+++ b/data/group/subs.json
@@ -1,57 +1,57 @@
 [
-    {
-      "SUB": "VIP",
-      "COST": 25,
-      "STATUS": 1
-    },
-    {
-      "SUB": "Premium Plus",
-      "COST": 30,
-      "STATUS": 1
-    },
-    {
-      "SUB": "Old Premium",
-      "COST": 17,
-      "STATUS": 1
-    },
-    {
-      "SUB": "Gold",
-      "COST": 13,
-      "STATUS": 1
-    },
-    {
-      "SUB": "Bronze",
-      "COST": 10,
-      "STATUS": 1
-    },
-    {
-      "SUB": "KDB",
-      "COST": 14,
-      "STATUS": 1
-    },
-    {
-      "SUB": "Technoid",
-      "COST": 13,
-      "STATUS": 1
-    },
-    {
-      "SUB": "Bluemoon",
-      "COST": 15,
-      "STATUS": 1
-    },
-    {
-      "SUB": "SOL",
-      "COST": 10,
-      "STATUS": "X"
-    },
-    {
-      "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": "X"
+  },
+  {
+    "SUB": "Gambler",
+    "COST": "X",
+    "STATUS": 1
+  },
+  {
+    "SUB": "All of em",
+    "COST": "X",
+    "STATUS": "X"
+  }
+]

From 0d88c20960f79fe80c9e3f241c3a383615eaaca4 Mon Sep 17 00:00:00 2001
From: "karl.hudgell" <karl.hudgell@bjss.com>
Date: Thu, 25 Jun 2020 21:55:17 +0100
Subject: [PATCH 5/7] get sub status

---
 app.js                         | 14 +++-----------
 data/bot/questions.js          | 25 +++++++++++++++++++++++--
 data/bot/requests/subStatus.js | 17 +++++++++++++++++
 data/group/subs.json           |  2 +-
 4 files changed, 44 insertions(+), 14 deletions(-)
 create mode 100644 data/bot/requests/subStatus.js

diff --git a/app.js b/app.js
index 4e9e5b2..4d2f351 100644
--- a/app.js
+++ b/app.js
@@ -64,19 +64,11 @@ bot.on('message', (msg) => {
     bot_chat.fOff(bot, msg, logger, name)
     // listen for "what sub should i buy?"
     bot_questions.whatSubShouldIBuy(bot, msg, logger)
-
-    bot_faq_subscription.prices(bot, msg, logger)
+    bot_questions.subStatus(bot, msg, logger)
     
 
- 
-
-   
-
-   
-
-
-
-   
+    // FAQ susbcription prices
+    bot_faq_subscription.prices(bot, msg, logger)
 
     const howToSignUp = "- how to get a subscription?";
     if (msg.text && msg.text.toString().toLowerCase() === howToSignUp) {
diff --git a/data/bot/questions.js b/data/bot/questions.js
index 0940ec2..35bfa81 100644
--- a/data/bot/questions.js
+++ b/data/bot/questions.js
@@ -1,14 +1,35 @@
-const fs = require('fs');
+const fs = require('fs')
+const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
 
 module.exports = {
     whatSubShouldIBuy: (bot, msg, logger) => {
         const whatSubShouldIBuy = "what sub should i buy"
-        const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
 
         if (msg.text && msg.text.toString().toLowerCase().includes(whatSubShouldIBuy)) {
             logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked what sub to buy");
             const randomSub = subs[Math.floor(Math.random() * subs.length)];
             bot.sendMessage(msg.chat.id, randomSub.SUB + "!");
         }
+    },
+    subStatus: (bot, msg, logger, name) => {
+        let string = ""
+        const subStatus = "sub status";
+        if (msg.text && msg.text.toString().toLowerCase().includes(subStatus)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
+            subs.forEach(element => {
+                if (element.COST != "X") {
+                    if (element.STATUS === 1) {
+                        element.STATUS = "Up"
+                    } else {
+                        element.STATUS = "Down"
+                    }
+                    let catString = element.SUB + " Is " + element.STATUS
+                    // console.log(catString)
+                    string += '\n' + catString;
+                }
+            });
+            // console.log(string)
+            bot.sendMessage(msg.chat.id, string)
+        }
     }
 }
\ No newline at end of file
diff --git a/data/bot/requests/subStatus.js b/data/bot/requests/subStatus.js
new file mode 100644
index 0000000..4fdda1b
--- /dev/null
+++ b/data/bot/requests/subStatus.js
@@ -0,0 +1,17 @@
+const fs = require('fs')
+const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
+
+module.exports = {
+    tellMe: (bot, msg, logger, name) => {
+
+        const subStatus = "sub status";
+        if (msg.text && msg.text.toString().toLowerCase().includes(subStatus)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
+
+
+            bot.sendMessage(msg.chat.id, subs)
+        }
+
+
+    }
+}
\ No newline at end of file
diff --git a/data/group/subs.json b/data/group/subs.json
index 0cac5d1..69eaff2 100644
--- a/data/group/subs.json
+++ b/data/group/subs.json
@@ -42,7 +42,7 @@
   {
     "SUB": "SOL",
     "COST": 10,
-    "STATUS": "X"
+    "STATUS": 0
   },
   {
     "SUB": "Gambler",

From bcaa1ef4da4478a4a912056cd3e1c55d4be295e0 Mon Sep 17 00:00:00 2001
From: "karl.hudgell" <karl.hudgell@bjss.com>
Date: Thu, 25 Jun 2020 22:44:18 +0100
Subject: [PATCH 6/7] sub status

---
 app.js                               |  3 ++-
 data/bot/requests/subStatus.js       | 17 -----------------
 data/bot/requests/updateSubStatus.js | 27 +++++++++++++++++++++++++++
 3 files changed, 29 insertions(+), 18 deletions(-)
 delete mode 100644 data/bot/requests/subStatus.js
 create mode 100644 data/bot/requests/updateSubStatus.js

diff --git a/app.js b/app.js
index 4d2f351..0f3af89 100644
--- a/app.js
+++ b/app.js
@@ -17,6 +17,7 @@ const bot_questions = require('./data/bot/questions')
 const bot_football = require('./data/bot/requests/football')
 const bot_joke = require('./data/bot/requests/joke')
 const bot_faq_subscription = require('./data/bot/faq/subscriptions')
+const bot_subStatus = require('./data/bot/requests/updateSubStatus')
 
 const token = process.env.BOT_TOKEN;
 const name = process.env.BOT_NAME;
@@ -65,7 +66,7 @@ bot.on('message', (msg) => {
     // listen for "what sub should i buy?"
     bot_questions.whatSubShouldIBuy(bot, msg, logger)
     bot_questions.subStatus(bot, msg, logger)
-    
+    bot_subStatus.setSubStatus(bot, msg, logger)
 
     // FAQ susbcription prices
     bot_faq_subscription.prices(bot, msg, logger)
diff --git a/data/bot/requests/subStatus.js b/data/bot/requests/subStatus.js
deleted file mode 100644
index 4fdda1b..0000000
--- a/data/bot/requests/subStatus.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const fs = require('fs')
-const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
-
-module.exports = {
-    tellMe: (bot, msg, logger, name) => {
-
-        const subStatus = "sub status";
-        if (msg.text && msg.text.toString().toLowerCase().includes(subStatus)) {
-            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
-
-
-            bot.sendMessage(msg.chat.id, subs)
-        }
-
-
-    }
-}
\ No newline at end of file
diff --git a/data/bot/requests/updateSubStatus.js b/data/bot/requests/updateSubStatus.js
new file mode 100644
index 0000000..19409d2
--- /dev/null
+++ b/data/bot/requests/updateSubStatus.js
@@ -0,0 +1,27 @@
+const fs = require('fs')
+const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
+
+module.exports = {
+    setSubStatus: (bot, msg, logger, name) => {
+
+        const setSub = "set sub";
+        if (msg.text && msg.text.toString().toLowerCase().includes(setSub)) {
+            logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
+            sub = msg.text.match(/\w+(?=( \w+){2}$)/g)[0]
+            status = msg.text.match(/\w+(?=( \w+){0}$)/g)[0]
+            if (status === "up") {
+                status = 1
+            } else {
+                status = 0
+            }
+            subs.forEach(function (element, index) {
+                if (element.SUB.toLowerCase() === sub) {
+                    subs[index].STATUS = status;   //set the value  
+                }
+            })
+            console.log(subs);
+            fs.writeFileSync('./data/group/subs.json', subs)
+            bot.sendMessage(msg.chat.id, sub + " sub updated")
+        }
+    }
+}
\ No newline at end of file

From 3271f64c925ebcc7e3b19f2f983c098e56e43abc Mon Sep 17 00:00:00 2001
From: "karl.hudgell" <karl.hudgell@bjss.com>
Date: Fri, 26 Jun 2020 12:16:25 +0100
Subject: [PATCH 7/7] working sub and stauts

---
 data/bot/questions.js                | 11 ++++--
 data/bot/requests/updateSubStatus.js |  7 ++--
 data/group/subs.json                 | 58 +---------------------------
 3 files changed, 11 insertions(+), 65 deletions(-)

diff --git a/data/bot/questions.js b/data/bot/questions.js
index 35bfa81..dd1542f 100644
--- a/data/bot/questions.js
+++ b/data/bot/questions.js
@@ -1,8 +1,9 @@
 const fs = require('fs')
-const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
 
 module.exports = {
     whatSubShouldIBuy: (bot, msg, logger) => {
+        let subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
+
         const whatSubShouldIBuy = "what sub should i buy"
 
         if (msg.text && msg.text.toString().toLowerCase().includes(whatSubShouldIBuy)) {
@@ -12,13 +13,15 @@ module.exports = {
         }
     },
     subStatus: (bot, msg, logger, name) => {
+        let subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
+
         let string = ""
         const subStatus = "sub status";
         if (msg.text && msg.text.toString().toLowerCase().includes(subStatus)) {
             logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
             subs.forEach(element => {
-                if (element.COST != "X") {
-                    if (element.STATUS === 1) {
+                if (element.STATUS != "X") {
+                    if (element.STATUS === 1) {   
                         element.STATUS = "Up"
                     } else {
                         element.STATUS = "Down"
@@ -29,7 +32,7 @@ module.exports = {
                 }
             });
             // console.log(string)
-            bot.sendMessage(msg.chat.id, string)
+            bot.sendMessage(msg.chat.id, string, { parse_mode: "HTML" })
         }
     }
 }
\ No newline at end of file
diff --git a/data/bot/requests/updateSubStatus.js b/data/bot/requests/updateSubStatus.js
index 19409d2..8632edb 100644
--- a/data/bot/requests/updateSubStatus.js
+++ b/data/bot/requests/updateSubStatus.js
@@ -1,13 +1,12 @@
 const fs = require('fs')
-const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
 
 module.exports = {
     setSubStatus: (bot, msg, logger, name) => {
-
+        let subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
         const setSub = "set sub";
         if (msg.text && msg.text.toString().toLowerCase().includes(setSub)) {
             logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
-            sub = msg.text.match(/\w+(?=( \w+){2}$)/g)[0]
+            sub = msg.text.match(/(?<=set sub )(.*)(?= to (up|down))/g)[0]
             status = msg.text.match(/\w+(?=( \w+){0}$)/g)[0]
             if (status === "up") {
                 status = 1
@@ -20,7 +19,7 @@ module.exports = {
                 }
             })
             console.log(subs);
-            fs.writeFileSync('./data/group/subs.json', subs)
+            fs.writeFileSync('./data/group/subs.json', JSON.stringify(subs))
             bot.sendMessage(msg.chat.id, sub + " sub updated")
         }
     }
diff --git a/data/group/subs.json b/data/group/subs.json
index 69eaff2..52540c6 100644
--- a/data/group/subs.json
+++ b/data/group/subs.json
@@ -1,57 +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": 0
-  },
-  {
-    "SUB": "Gambler",
-    "COST": "X",
-    "STATUS": 1
-  },
-  {
-    "SUB": "All of em",
-    "COST": "X",
-    "STATUS": "X"
-  }
-]
+[{"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":0},{"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