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.
commands/_removekey.js
javascript · 69 lines
1/**#command2name: /removekey3answer: 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 if (!params) {17 Bot.sendMessage("❌ <b>Usage:</b>\n<code>/removekey PRODUCT NAME | DAYS</code>\n\n<i>Example: DRIP CLIENT | 1_Day</i>", { parse_mode: "HTML" });18 return;19 }20 21 var args = params.split("|");22 if (args.length < 2) {23 Bot.sendMessage("❌ <b>Format Error!</b> Use Pipe symbol:\n<code>/removekey PRODUCT NAME | DAYS</code>", { parse_mode: "HTML" });24 return;25 }26 27 var prodName = args[0].trim();28 var planDays = args[1].trim();29 var cleanPlanDays = planDays.includes("_Day") ? planDays : planDays + "_Day";30 31 var stockKeyText = "stock_" + prodName + "_" + cleanPlanDays;32 var keyStock = Bot.getProperty(stockKeyText) || [];33 34 if (keyStock.length === 0) {35 Bot.sendMessage("❌ Product: <b>" + prodName + " (" + cleanPlanDays + ")</b> ka stock already empty hai!", { parse_mode: "HTML" });36 return;37 }38 39 var inlineButtons = [];40 41 // Har ek key ke liye ek individual delete button banana42 for (var i = 0; i < keyStock.length; i++) {43 var fullKey = keyStock[i];44 // Display ke liye key ka chota part dikhana taaki button bada na ho45 var shortKey = fullKey.length > 15 ? fullKey.substring(0, 12) + "..." : fullKey; 46 47 inlineButtons.push([48 {49 text: "🗑️ Key " + (i + 1) + " [" + shortKey + "]",50 // Callback me parameters pass karna: index_number | prodName | planDays51 callback_data: "/deletekey_now " + i + "|" + prodName + "|" + cleanPlanDays52 }53 ]);54 }55 56 var menuText = "<blockquote><b>🗑️ SELECT KEY TO REMOVE</b>\n\n" +57 "• <b>Product:</b> <code>" + prodName + "</code>\n" +58 "• <b>Plan:</b> <code>" + cleanPlanDays + "</code>\n" +59 "• <b>Total Keys:</b> <code>" + keyStock.length + "</code>\n\n" +60 "<i>Niche diye gaye buttons me se jis key ko remove karna hai, uspar click karein:</i></blockquote>";61 62 Bot.sendMessage(menuText, {63 parse_mode: "HTML",64 reply_markup: JSON.stringify({ inline_keyboard: inlineButtons })65 });66 67} catch (err) {68 Bot.sendMessage("⚠️ Error: " + err.message);69}