pre new changes

This commit is contained in:
Karl 2021-07-12 13:33:59 +00:00
parent 5e617bc13b
commit fa689f50d1
6 changed files with 54 additions and 21 deletions

5
app.js
View File

@ -70,6 +70,11 @@ bot.on('message', (msg) => {
} }
} }
if (msg.text && msg.text.toString().includes("/password")) {
match = msg.text.substring(10);
questions.password(bot, msg, match, logger)
}
if (msg.text && msg.text.toString().toLowerCase().includes("set sub")) { if (msg.text && msg.text.toString().toLowerCase().includes("set sub")) {
bot_subStatus.setSubStatus(bot, msg, logger) bot_subStatus.setSubStatus(bot, msg, logger)
} }

View File

@ -1,4 +1,5 @@
const fs = require('fs') const fs = require('fs')
const Nato = require('nato');
module.exports = { module.exports = {
whatSubShouldIBuy: (bot, msg, logger) => { whatSubShouldIBuy: (bot, msg, logger) => {
@ -32,5 +33,16 @@ module.exports = {
}); });
// console.log(string) // console.log(string)
bot.sendMessage(msg.chat.id, string, { parse_mode: "HTML" }) bot.sendMessage(msg.chat.id, string, { parse_mode: "HTML" })
},
password: (bot, msg, match, logger) => {
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked for their password being spelt");
// console.log(string)
let sendString = new Nato(match.toLowerCase())
bot.sendMessage(msg.chat.id, sendString.nato, {
force_reply: true,
parse_mode: "HTML"
})
} }
} }

View File

@ -39,7 +39,7 @@ const chat = [
"TEXT": [ "TEXT": [
"Hints & Tips" "Hints & Tips"
], ],
"MENU": '[["- IPTV"],["- How do I clear cache?"],["- Home"]]' "MENU": '[["- IPTV"],["- How do I clear cache?"],["- What IS my password?"],["- Home"]]'
}, },
{ {
"NAME": "- Subscriptions", "NAME": "- Subscriptions",
@ -181,7 +181,16 @@ const chat = [
"SurfShark is the VPN that we advise you use on your device to bypass the blocks,\n\nYou can install this on your device from our FileLinked\n\nWe provide a username and password for you to use in the updates groups. DO NOT SHARE THE DETAILS" "SurfShark is the VPN that we advise you use on your device to bypass the blocks,\n\nYou can install this on your device from our FileLinked\n\nWe provide a username and password for you to use in the updates groups. DO NOT SHARE THE DETAILS"
], ],
"MENU": '[[]]' "MENU": '[[]]'
} },
{
"NAME": "- What IS my password?",
"TEXT": [
"If you want to know what your password is (sometimes its hard working out 0 and O) you can ask me in this chat by copying and pasting the password you received from Sarah",
"/password CopyAndPasteYourPasswordHere",
"I will send you back a phonetic spelling of your password, don't worry, I dont' save it.",
],
"MENU": '[[]]'
},
] ]
module.exports = chat; module.exports = chat;

View File

@ -66,7 +66,7 @@
"SUB": "KDB", "SUB": "KDB",
"COST": 0, "COST": 0,
"STATUS": 1, "STATUS": 1,
"IMAGE": "./data/group/Sports.jpg", "IMAGE": "./data/group/KDB.jpg",
"APPS": [ "APPS": [
"Red XCIPTV", "Red XCIPTV",
"White&Black IM", "White&Black IM",
@ -90,7 +90,7 @@
"SUB": "Gunslinger", "SUB": "Gunslinger",
"COST": 0, "COST": 0,
"STATUS": 1, "STATUS": 1,
"IMAGE": "X", "IMAGE": "./data/group/Gunslinger.jpg",
"APPS": [ "APPS": [
"Red XCIPTV", "Red XCIPTV",
"White&Black IM", "White&Black IM",
@ -102,7 +102,7 @@
"SUB": "Irish Lass", "SUB": "Irish Lass",
"COST": 0, "COST": 0,
"STATUS": 1, "STATUS": 1,
"IMAGE": "X", "IMAGE": "./data/group/Irish_Lass.jpg",
"APPS": [ "APPS": [
"White&Black IM", "White&Black IM",
"Green SMARTERS" "Green SMARTERS"

5
package-lock.json generated
View File

@ -485,6 +485,11 @@
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
}, },
"phonetic-alphabet-converter": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/phonetic-alphabet-converter/-/phonetic-alphabet-converter-1.1.0.tgz",
"integrity": "sha512-0jTb/6wXLLlL8Mxe45zYwT/ukAOAbXgVq192V4ThZQlBf2YDMGyw81QudfhiSEO2ViMCNUDBIrIF0mZSUUgyGw=="
},
"process-nextick-args": { "process-nextick-args": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",

View File

@ -17,8 +17,10 @@
"cached-request": "^2.0.1", "cached-request": "^2.0.1",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"nato": "^0.1.1",
"node-telegram-bot-api": "^0.50.0", "node-telegram-bot-api": "^0.50.0",
"perfect-logger": "^2.0.1", "perfect-logger": "^2.0.1",
"phonetic-alphabet-converter": "^1.1.0",
"request": "^2.88.2", "request": "^2.88.2",
"require-dir": "^1.2.0", "require-dir": "^1.2.0",
"throttled-request": "^0.1.1" "throttled-request": "^0.1.1"