ayushyadav7970824760/goldensellingstore_botPublic · Bot Template
AIThis Telegram store bot lets customers browse digital products and plans, apply coupons, add funds via UPI, and receive purchased keys. It includes a full admin panel for managing products, reordering items, setting reseller prices, viewing and removing key stock, configuring UPI payment details and update links, and checking user balances. Co-admins and resellers are supported, and support tickets are forwarded to the admin.
Commercedigital_storeadmin_panelupi_paymentsresellercouponskey_stock
146 commands0 envUpdated 2d agoCreated Sep 5, 2026
commands/_view_keys_list.js
javascript · 85 lines
1/**#command2name: /view_keys_list3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var adminId = "8477746023";14 if (String(chat.chatid) !== adminId) return;15 16 var callbackId = request ? request.id : null;17 var dataStr = params ? params.trim() : "";18 19 if (!dataStr) {20 var cbData = request && request.callback_query ? request.callback_query.data : "";21 dataStr = cbData.replace("/view_keys_list ", "");22 }23 24 if (!dataStr) {25 if (callbackId) Api.answerCallbackQuery({ callback_query_id: callbackId, text: "❌ Empty execution data string!", show_alert: true });26 return;27 }28 29 var parts = dataStr.split("|");30 var prodName = parts[0].trim();31 var cleanPlanDays = parts[1].trim();32 33 // Fetch from key properties tables34 var stockKeyText = "stock_" + prodName + "_" + cleanPlanDays;35 var keyStock = Bot.getProperty(stockKeyText) || [];36 37 if (keyStock.length === 0) {38 if (callbackId) {39 Api.answerCallbackQuery({ callback_query_id: callbackId, text: "❌ Is plan me currently 0 keys hain!", show_alert: true });40 } else {41 Bot.sendMessage("❌ Stock empty for: " + prodName + " (" + cleanPlanDays + ")");42 }43 return;44 }45 46 var reportText = "<blockquote><b>🔑 LIVE ACTIVE KEYS LIST</b>\n\n" +47 "• <b>Product:</b> <code>" + prodName.toUpperCase() + "</code>\n" +48 "• <b>Plan:</b> <code>" + cleanPlanDays + "</code>\n" +49 "• <b>Total Available:</b> <code>" + keyStock.length + " Keys</code>\n" +50 "━━━━━━━━━━━━━━━━━━━━━━━━━━\n";51 52 for (var i = 0; i < keyStock.length; i++) {53 reportText += (i + 1) + ". <code>" + keyStock[i] + "</code>\n";54 }55 56 reportText += "</blockquote>";57 58 var inlineButtons = [59 [60 { text: "Back to Stock List", callback_data: "/allkey" }61 ]62 ];63 64 if (request && request.message) {65 HTTP.post({66 url: "https://api.telegram.org/bot" + bot.token + "/editMessageText",67 body: {68 chat_id: String(chat.chatid),69 message_id: Number(request.message.message_id),70 text: reportText,71 parse_mode: "HTML",72 reply_markup: JSON.stringify({ inline_keyboard: inlineButtons })73 }74 });75 } else {76 Bot.sendMessage(reportText, { parse_mode: "HTML", reply_markup: JSON.stringify({ inline_keyboard: inlineButtons }) });77 }78 79 if (callbackId) {80 Api.answerCallbackQuery({ callback_query_id: callbackId, text: "Keys fetched!" });81 }82 83} catch (err) {84 Bot.sendMessage("⚠️ Rendering Keys List Mismatch: " + err.message);85}