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/_onPressQR.js
javascript ยท 59 lines
1/**#command2name: /onPressQR3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 if (!content) {14 Bot.sendMessage("โ ๏ธ <b>Gateway Error:</b> No response from server. Try again.", { parse_mode: "HTML" });15 return;16 }17 18 var res = (typeof content === "object") ? content : JSON.parse(content);19 20 if (res.status === "success" && res.data) {21 var orderId = res.data.order_id;22 var qrUrl = res.data.qr_url;23 var qrAmount = res.data.amount;24 var expireTime = res.data.expires_at_ist;25 26 User.setProperty("pending_order_id", orderId, "string");27 28 var caption = "๐ฆ <tg-emoji emoji-id='5893431652578758294'>๐ฐ</tg-emoji> <b>PAYMENT GATEWAY</b>\n" +29 "โโโโโโโโโโโโโโโโโโโโโโ\n" +30 "๐ <b>Amount: โน" + qrAmount + "</b>\n" +31 "๐ฒ <i>Scan QR & Complete Payment</i>\n" +32 "โณ <b>Expire Time:</b> " + expireTime + "\n\n" +33 "โ
<i>After Payment Click Verify Payment Button</i>\n" +34 "โโโโโโโโโโโโโโโโโโโโโโ\n" +35 "๐ <tg-emoji emoji-id='6192553546102085729'>๐ค</tg-emoji> <i>Auto Verification System Powered</i>";36 37 Api.sendPhoto({38 photo: qrUrl,39 caption: caption,40 parse_mode: "HTML",41 reply_markup: JSON.stringify({42 inline_keyboard: [43 [44 { text: "Verify Payment", callback_data: "/check" }45 ],46 [47 { text: "Cancel / Back", callback_data: "/cancel_order" }48 ]49 ]50 })51 });52 53 } else {54 Bot.sendMessage("โ ๏ธ <b>Failed to generate QR:</b> " + (res.message || "Unknown error"), { parse_mode: "HTML" });55 }56 57} catch (err) {58 Bot.sendMessage("โ ๏ธ <b>Exception:</b> " + err.message, { parse_mode: "HTML" });59}