const fs = require('fs') const subs = JSON.parse(fs.readFileSync('./data/group/subs.json', 'utf8')) module.exports = { pricesImageList: (bot, msg, logger) => { const subPrice = "- subscription options"; if (msg.text && msg.text.toString().toLowerCase() === subPrice) { 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) } } bot.sendMessage(msg.chat.id, "All of these prices are for 12 Month subscription subs") } } }