tell me my password and admins
This commit is contained in:
parent
2d56a7381e
commit
0aacec6fa6
@ -1,4 +1,6 @@
|
||||
const fs = require('fs')
|
||||
const Nato = require('nato');
|
||||
|
||||
|
||||
module.exports = {
|
||||
whatSubShouldIBuy: (bot, msg, logger) => {
|
||||
@ -17,20 +19,52 @@ module.exports = {
|
||||
|
||||
let string = ""
|
||||
const subStatus = "sub status";
|
||||
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
|
||||
subs.forEach(element => {
|
||||
if (element.STATUS != "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;
|
||||
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
|
||||
subs.forEach(element => {
|
||||
if (element.STATUS != "X") {
|
||||
if (element.STATUS === 1) {
|
||||
element.STATUS = "Up"
|
||||
} else {
|
||||
element.STATUS = "Down"
|
||||
}
|
||||
});
|
||||
// console.log(string)
|
||||
bot.sendMessage(msg.chat.id, string, { parse_mode: "HTML" })
|
||||
}
|
||||
}
|
||||
let catString = element.SUB + " Is " + element.STATUS
|
||||
// console.log(catString)
|
||||
string += '\n' + catString;
|
||||
}
|
||||
});
|
||||
// console.log(string)
|
||||
bot.sendMessage(msg.chat.id, string, { parse_mode: "HTML" })
|
||||
},
|
||||
adminStatus: (bot, msg, logger, name) => {
|
||||
let admins = JSON.parse(fs.readFileSync('./data/group/admins.json', 'utf8'))
|
||||
|
||||
let string = ""
|
||||
const subStatus = "sub status";
|
||||
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Asked how to get a subscription");
|
||||
admins.forEach(element => {
|
||||
if (element.STATUS != "X") {
|
||||
if (element.STATUS === 1) {
|
||||
element.STATUS = "Here"
|
||||
} else {
|
||||
element.STATUS = "Away"
|
||||
}
|
||||
let catString = element.NAME + " Is " + element.STATUS
|
||||
// console.log(catString)
|
||||
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 how to get a subscription");
|
||||
// console.log(string)
|
||||
|
||||
let sendString = new Nato(match)
|
||||
|
||||
bot.sendMessage(msg.chat.id, sendString.nato, {
|
||||
force_reply: true,
|
||||
parse_mode: "HTML"
|
||||
})
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user