ashoksarande3/ASHOK_HACK_STORE_BOTPublic · Bot Template

AIThis bot operates as a commercial storefront for selling Free Fire game hacks and cheats via UPI QR code payments. It features a dynamic pricing system with separate normal and reseller prices, product plans with flexible durations (days, hours, minutes), and a reseller program requiring a one-time upgrade fee. The bot handles payment verification through QR code generation and expiry tracking, user verification via Telegram contact sharing, and admin tools for stock management, plan creation, and ownership transfer. It includes a balance system, maintenance mode, and Telegram Stars payment fallback. The codebase uses TeleBotHost's TBL JavaScript APIs (Bot, Api, HTTP, db properties, Libs) for all logic.

Commercefreefiregame-hacksupi-paymentsqr-codesreseller-systemdynamic-pricing
ProfileTelegram
102 commands0 envUpdated 16d agoCreated Aug 22, 2026
Back to folder

commands/_allkey.js

javascript · 105 lines

Raw
1/**#command2name: /allkey3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var adminId = "8660373585"; // Aapki Admin ID14  if (String(chat.chatid) !== adminId) return;15 16  var productList = [];17  try {18    productList = Bot.getProperty("stored_products") || [];19  } catch (err) {20    productList = [];21  }22 23  var inlineButtons = [];24 25  // 🛡️ SYSTEM SAFEGUARD: Agar master product data structural crash ho, to standard hardcoded check fallback lagana26  if (!productList || productList.length === 0) {27    // Agar empty list hai to manually display list paths28    inlineButtons.push([29      { text: "🔄 Load DRIP CLIENT (1 Day)", callback_data: "/view_keys_list DRIP CLIENT|1_Day" }30    ]);31  } else {32    // Standard dynamic listing execution loop33    for (var i = 0; i < productList.length; i++) {34      var product = productList[i];35      if (!product || !product.name) continue;36 37      var plans = product.plans || [];38      // Default configurations display if plans empty39      if (plans.length === 0) {40        plans = [{ days: "1" }, { days: "7" }];41      }42 43      for (var j = 0; j < plans.length; j++) {44        var plan = plans[j];45        if (!plan || !plan.days) continue;46        47        var cleanProdName = product.name.trim();48        var cleanPlanDays = String(plan.days).trim() + "_Day";49        50        var stockKeyText = "stock_" + cleanProdName + "_" + cleanPlanDays;51        var currentStock = Bot.getProperty(stockKeyText) || [];52 53        inlineButtons.push([54          {55            text: cleanProdName.toUpperCase() + " (" + plan.days + " Days) - [" + currentStock.length + " Keys]",56            callback_data: "/view_keys_list " + cleanProdName + "|" + cleanPlanDays57          }58        ]);59      }60    }61  }62 63  // Final menu check interface safety attachment64  if (inlineButtons.length === 0) {65    inlineButtons.push([{ text: "🔄 Refresh Stock Matrix", callback_data: "/allkey" }]);66  }67 68  var menuText = "<blockquote><b>🔑 GLOBAL STOCK AUDIT LOGS</b>\n\n" +69                 "<i>Niche diye gaye buttons me product aur uske plan ka live stock status dikh raha hai. Saari keys dekhne ke liye click karein:</i></blockquote>";70 71  var allKeyMarkup = JSON.stringify({ inline_keyboard: inlineButtons });72  var allKeyQueryId = request ? (request.id || (request.callback_query && request.callback_query.id)) : null;73  if (allKeyQueryId) {74    try { Api.answerCallbackQuery({ callback_query_id: String(allKeyQueryId) }); } catch (e) {}75  }76 77  if (request && request.message && request.message.message_id && !request.message.photo) {78    try {79      Api.editMessageText({80        chat_id: chat.chatid,81        message_id: Number(request.message.message_id),82        text: menuText,83        parse_mode: "HTML",84        reply_markup: allKeyMarkup85      });86    } catch (e) {87      Api.sendMessage({88        chat_id: chat.chatid,89        text: menuText,90        parse_mode: "HTML",91        reply_markup: allKeyMarkup92      });93    }94  } else {95    Api.sendMessage({96      chat_id: chat.chatid,97      text: menuText,98      parse_mode: "HTML",99      reply_markup: allKeyMarkup100    });101  }102 103} catch (err) {104  Bot.sendMessage("⚠️ Master Inventory Render Error: " + err.message);105}