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/_gencoupon.js
javascript · 35 lines
1/**#command2name: /gencoupon3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🎟 ADMIN — Coupon Generator Wizard (Step 1: kicks off in _start.js MODULE 3)14// =========================================================15 16try {17 var adminId = Bot.getProperty("owner_id") || "8660373585";18 var isCoAdmin0 = Bot.getProperty("co_admin_" + String(chat.chatid));19 if (String(chat.chatid) !== adminId && !isCoAdmin0) {20 Bot.sendMessage("❌ You are not the admin!");21 return;22 }23 24 User.setProperty("coupon_gen_step", "code", "string");25 26 Bot.sendMessage(27 "<blockquote>🎟 <b>COUPON GENERATOR</b></blockquote>\n\n" +28 "<tg-emoji emoji-id='6080214566191505147'>🏷</tg-emoji> <b>Coupon code kya rakhna hai?</b>\n" +29 "<i>Type karke bhejein, jaise: SAVE10</i>",30 { parse_mode: "HTML" }31 );32 33} catch (err) {34 Bot.sendMessage("⚠️ Error: " + err.message);35}