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/_resellerprice_id.js

javascript · 76 lines

Raw
1/**#command2name: /resellerprice_id3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var adminId = "8660373585";14  if (!chat || String(chat.chatid) !== adminId) return;15 16  // 🔥 CLEAR SPINNER IMMEDIATELY17  if (typeof request !== "undefined" && request) {18    let queryId = request.id || (request.callback_query && request.callback_query.id);19    if (queryId) { try { Api.answerCallbackQuery({ callback_query_id: queryId }); } catch(qErr){} }20  }21 22  var rawInput = (typeof message !== "undefined" && message) ? message.trim() : "";23  if (!rawInput && typeof params !== "undefined" && params) { rawInput = String(params).trim(); }24 25  if (rawInput.indexOf("/resellerprice_id") === 0) {26    rawInput = rawInput.replace("/resellerprice_id", "").trim();27  }28 29  // 🛡️ NO REPLY CRASH FIX: Display interactive instruction if text missing30  if (!rawInput) {31    Api.sendMessage({32      chat_id: adminId,33      text: "✍️ <b>Set Reseller Price Node Matrix:</b>\n\nKripya is text ko copy karein, edit karein aur reply mein bhejiye:\n\n<code>/resellerprice_id [Category Name] [Price]</code>\n\n<b>Example:</b>\n<code>/resellerprice_id Facebook Id 120</code>",34      parse_mode: "HTML"35    });36    return;37  }38 39  var parts = rawInput.split(" ");40  if (parts.length < 2) {41    Api.sendMessage({42      chat_id: adminId,43      text: "⚠️ <b>Format Galat Hai!</b>\nSahi tarika: <code>Category_Name Price</code>\nExample: <code>Facebook Id 120</code>",44      parse_mode: "HTML"45    });46    return;47  }48 49  var price = parts[parts.length - 1].trim();50  var catName = parts.slice(0, -1).join(" ").trim();51 52  if (isNaN(price)) {53    Api.sendMessage({ chat_id: adminId, text: "⚠️ <b>Price ek valid number hona chahiye!</b>" });54    return;55  }56 57  var catSlug = catName.toLowerCase().replace(/[^a-z0-9]/g, "");58  var categories = Bot.getProperty("ff_categories") || {};59 60  if (!categories[catSlug]) {61    Api.sendMessage({ chat_id: adminId, text: "❌ <b>Category [ " + catName + " ] system records mein nahi mili!</b>" });62    return;63  }64 65  categories[catSlug].reseller_price = parseFloat(price);66  Bot.setProperty("ff_categories", categories, "json");67 68  Api.sendMessage({69    chat_id: adminId,70    text: "✅ <b>Reseller Price Updated Successfully!</b>\n\n• <b>Category:</b> <code>" + categories[catSlug].name + "</code>\n• <b>New Reseller Price:</b> <code>₹" + price + "</code>",71    parse_mode: "HTML"72  });73 74} catch(e) {75  Bot.sendMessage("Error in Set Reseller Price: " + e.message);76}