subs finished

This commit is contained in:
karl.hudgell 2020-06-25 21:05:19 +01:00
parent b472bed57f
commit 51af65dd31
2 changed files with 71 additions and 66 deletions

View File

@ -1,18 +1,23 @@
const fs = require('fs')
const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
module.exports = { module.exports = {
prices: (bot, msg, logger) => { prices: (bot, msg, logger) => {
const subPrice = "- subscription prices"; const subPrice = "- subscription prices";
if (msg.text && msg.text.toString().toLowerCase() === subPrice) { if (msg.text && msg.text.toString().toLowerCase() === subPrice) {
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Got subscription Prices"); logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Got subscription Prices");
bot.sendMessage(msg.chat.id, ` bot.sendMessage(msg.chat.id,
PREMIUM PLUS ----£30\n `-
VIP-----------------------£25\n ${subs[0].SUB} ----£${subs[0].COST}\n
OLD PREMIUM -----£17\n ${subs[1].SUB} -----------------------£${subs[1].COST}\n
BLUEMOON ---------£15\n ${subs[2].SUB} -----£${subs[2].COST}\n
KDB --------------------£14\n ${subs[3].SUB} ---------£${subs[3].COST}\n
GOLD ------------------£13\n ${subs[4].SUB} --------------------£${subs[4].COST}\n
TECHNOID -----------£13\n ${subs[5].SUB} ------------------£${subs[5].COST}\n
BRONZE --------------£10\n ${subs[6].SUB} -----------£${subs[6].COST}\n
SOL ---------------------£10`) ${subs[7].SUB} --------------£${subs[7].COST}\n
${subs[8].SUB} ---------------------£${subs[8].COST}
`)
.then(() => { .then(() => {
return bot.sendMessage(msg.chat.id, "All of these prices are for 12 Month subscription subs").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.") return bot.sendMessage(msg.chat.id, "Keep an eye out though because we offer special deals on different subs from time to time.")

View File

@ -1,27 +1,22 @@
[ [
{
"SUB": "VIP",
"COST": 25,
"STATUS": 1
},
{ {
"SUB": "Premium Plus", "SUB": "Premium Plus",
"COST": 30, "COST": 30,
"STATUS": 1 "STATUS": 1
}, },
{
"SUB": "VIP",
"COST": 25,
"STATUS": 1
},
{ {
"SUB": "Old Premium", "SUB": "Old Premium",
"COST": 17, "COST": 17,
"STATUS": 1 "STATUS": 1
}, },
{ {
"SUB": "Gold", "SUB": "Bluemoon",
"COST": 13, "COST": 15,
"STATUS": 1
},
{
"SUB": "Bronze",
"COST": 10,
"STATUS": 1 "STATUS": 1
}, },
{ {
@ -29,14 +24,19 @@
"COST": 14, "COST": 14,
"STATUS": 1 "STATUS": 1
}, },
{
"SUB": "Gold",
"COST": 13,
"STATUS": 1
},
{ {
"SUB": "Technoid", "SUB": "Technoid",
"COST": 13, "COST": 13,
"STATUS": 1 "STATUS": 1
}, },
{ {
"SUB": "Bluemoon", "SUB": "Bronze",
"COST": 15, "COST": 10,
"STATUS": 1 "STATUS": 1
}, },
{ {