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/_confirm_delete_stock.js
javascript ยท 64 lines
1/**#command2name: /confirm_delete_stock3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var ADMIN_ID = "8660373585";14 if (String(user.telegramid) !== ADMIN_ID) return;15 16 if (!params) return;17 var catSlug = params.trim().toLowerCase();18 19 var categories = Bot.getProperty("ff_categories") || {};20 21 // Stock data clean logic dono references se22 var oldStock = categories[catSlug] && categories[catSlug].stock_list ? categories[catSlug].stock_list : (Bot.getProperty("ff_stock_" + catSlug) || []);23 var totalRemoved = Array.isArray(oldStock) ? oldStock.length : 0;24 25 // 1. Clear from separate property26 Bot.setProperty("ff_stock_" + catSlug, [], "json");27 28 // 2. Clear inside ff_categories property (if exists)29 if (categories[catSlug]) {30 categories[catSlug].stock_list = [];31 Bot.setProperty("ff_categories", categories, "json");32 }33 34 // Purane confirmation message ko edit karke success message dikhana35 var queryId = request.id || (request.callback_query && request.callback_query.id);36 37 var successText = "<blockquote><tg-emoji emoji-id='6267140231632262769'>โจ</tg-emoji> <b>STOCK PURGED SUCCESSFULLY</b></blockquote>\n" +38 "โโโโโโโโโโโโโโโโโโโโโโโโโโ\n\n" +39 "๐ <b>Category Slug:</b> <code>" + catSlug.toUpperCase() + "</code>\n" +40 "๐ <b>Removed Count:</b> <code>" + totalRemoved + " Items</code>\n\n" +41 "โโโโโโโโโโโโโโโโโโโโโโโโโโ\n" +42 "โ
<i>All stock has been permanently wiped from the database.</i>";43 44 HTTP.post({45 url: "https://api.telegram.org/bot" + bot.token + "/editMessageText",46 body: {47 chat_id: chat.chatid,48 message_id: request.message.message_id,49 text: successText,50 parse_mode: "HTML"51 }52 });53 54 if (queryId) {55 Api.answerCallbackQuery({56 callback_query_id: String(queryId),57 text: "๐๏ธ Stock cleared completely!",58 show_alert: false59 });60 }61 62} catch (e) {63 Bot.sendMessage("Delete Callback Error: " + e.message);64}