BBLBTV_Suzie/data/bot/functions/faq/subscriptions.js
2020-08-03 11:45:46 +00:00

23 lines
1021 B
JavaScript

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, "Apart from Gunslinger, its LIFETIME.").then(() => {
return bot.sendMessage(msg.chat.id, "Keep an eye out though because we offer special deals on different subs from time to time.")
})
})
})
}
}