BobbyIPTV_Suzie/data/bot/functions/faq/subscriptions.js

46 lines
2.6 KiB
JavaScript
Raw Normal View History

2020-06-30 16:25:55 +00:00
const fs = require('fs')
const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8'))
module.exports = {
prices: (bot, msg, logger) => {
let string = ""
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Got subscription Prices");
subs.forEach(element => {
if (element.COST != "X") {
let catString = element.SUB + " - £" + element.COST + "."
string += '\n' + catString;
}
});
bot.sendMessage(msg.chat.id, string, { parse_mode: "HTML" }).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.")
})
})
},
pricesImageList: (bot, msg, logger) => {
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Got subscription Prices");
for (var i = 0, len = subs.length; i < len; i++) {
if (subs[i].IMAGE != "X") {
bot.sendPhoto(msg.chat.id, subs[i].IMAGE)
}
}
2020-11-07 12:43:52 +00:00
// bot.sendMessage(msg.chat.id, "All of these prices are for 12 Month subscription subs")
2021-10-23 16:54:05 +00:00
},
newPrices: (bot, msg, logger) => {
let string = ""
logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " Got subscription Prices");
// subs.forEach(element => {
// if (element.COST != "X") {
// let catString = element.SUB + " - £" + element.COST + "."
// string += '\n' + catString;
// }
// });
bot.sendMessage(msg.chat.id, "With Bob15TV we have many different subscriptions available. Some of these subscriptions have catch up and some do not. All subscriptions will have UK, US, Irish, 3PMs, PPV as standard content but will have lots of other countries too. There will also be different VOD and TV Series on each sub.").then(() => {
return bot.sendMessage(msg.chat.id, "Please DM Sarah @Sarbob15 and she will forward on posters for all of the different subs showing their content.").then(() => {
return bot.sendMessage(msg.chat.id, "Please note with all subs (except Top Vod) live tv is what you are purchasing. Catch up, Vod & Series etc are always a bonus and can go at anytime.\n\nIt is always the suppliers decision to keep or delete these extras.")
})
})
},
2020-06-30 16:25:55 +00:00
}