pre new changes
This commit is contained in:
parent
5e617bc13b
commit
fa689f50d1
5
app.js
5
app.js
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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) => {
|
||||||
@ -17,20 +18,31 @@ module.exports = {
|
|||||||
|
|
||||||
let string = ""
|
let string = ""
|
||||||
const subStatus = "sub status";
|
const subStatus = "sub status";
|
||||||
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
|
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
|
||||||
subs.forEach(element => {
|
subs.forEach(element => {
|
||||||
if (element.STATUS != "X") {
|
if (element.STATUS != "X") {
|
||||||
if (element.STATUS === 1) {
|
if (element.STATUS === 1) {
|
||||||
element.STATUS = "Up"
|
element.STATUS = "Up"
|
||||||
} else {
|
} else {
|
||||||
element.STATUS = "Down"
|
element.STATUS = "Down"
|
||||||
}
|
|
||||||
let catString = element.SUB + " Is " + element.STATUS
|
|
||||||
// console.log(catString)
|
|
||||||
string += '\n' + catString;
|
|
||||||
}
|
}
|
||||||
});
|
let catString = element.SUB + " Is " + element.STATUS
|
||||||
// console.log(string)
|
// console.log(catString)
|
||||||
bot.sendMessage(msg.chat.id, string, { parse_mode: "HTML" })
|
string += '\n' + catString;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
// console.log(string)
|
||||||
|
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"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
@ -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
5
package-lock.json
generated
@ -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",
|
||||||
|
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user