BobbyIPTV_Suzie/data/bot/faq/subscriptions.js
2020-06-26 20:51:38 +01:00

29 lines
1.4 KiB
JavaScript

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,
`-
${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.")
})
})
}
}
}