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/_menu.js
javascript ยท 82 lines
1/**#command2name: /menu3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var userId = user.telegramid;14 15 // โ
VERIFICATION CHECK16 var isVerified = (Bot.getProperty("verified_" + userId) === true) || (User.getProperty("verified_" + userId) === true);17 18 if (!isVerified) {19 Api.sendMessage({20 chat_id: chat.chatid,21 text: "<blockquote><b>๐ฐ Pehle account verify karein.</b>\nUse /start</blockquote>",22 parse_mode: "HTML"23 });24 return;25 }26 27 // ๐ REAL BALANCE FETCH โ โ
FIXED: ab same wallet store se read hoga jo purchase flows use karte hain28 // (Libs.ResourcesLib "balance" resource + admin bonus balance), taaki balance sab jagah same dikhe.29 var userBal = (function() {30 var resBal = 0;31 try { resBal = Number(Libs.ResourcesLib.userRes("balance").value()) || 0; } catch (e) {}32 var bonusBal = Number(Bot.getProperty("balance" + userId) || 0);33 return (resBal + bonusBal).toFixed(2);34 })();35 36 var welcomeMessage =37 "<tg-emoji emoji-id=\"6266967801580231067\">๐</tg-emoji> <tg-emoji emoji-id=\"5866053971960929280\">๐ช</tg-emoji> <b>โ ASHOK PAINL STORE PANEL โ</b> <tg-emoji emoji-id=\"5866053971960929280\">๐ช</tg-emoji> <tg-emoji emoji-id=\"6266967801580231067\">๐</tg-emoji>\n\n" +38 "<tg-emoji emoji-id=\"6080228009439141516\">๐ง</tg-emoji> <b>Genuine, limited-stock books. Instant delivery.</b>\n\n" +39 "<tg-emoji emoji-id='5231200819986047254'>๐ฐ</tg-emoji> <b>Balance:</b> โน" + userBal + "\n\n" +40 "<i>Tap any button below to begin:</i> <tg-emoji emoji-id='6057415823222379852'>๐</tg-emoji>";41 42 var multiColorKeyboard = [43 [{ text: "Shop Now", callback_data: "/buy_hack", style: "primary", icon_custom_emoji_id: "5866053971960929280" }],44 [45 { text: "Profile", callback_data: "/profile", style: "primary", icon_custom_emoji_id: "5260399854500191689" },46 { text: "Add Balance", callback_data: "/addfund", style: "success", icon_custom_emoji_id: "6147815702163102310" }47 ],48 [49 { text: "My Keys", callback_data: "/mykey", style: "primary", icon_custom_emoji_id: "6113743082358841933" },50 { text: "How to use", callback_data: "/how", style: "danger", icon_custom_emoji_id: "6080214566191505147" }51 ],52 [{ text: "Payment Proofs", url: "https://t.me/ASHOKHACKPROOF", style: "success", icon_custom_emoji_id: "5330237710655306682" }],53 [{ text: "Support", callback_data: "/support", style: "danger", icon_custom_emoji_id: "5436113877181941026" }]54 ];55 56 if (Bot.getProperty("reseller_system_enabled") && !Bot.getProperty("is_reseller_" + userId)) {57 multiColorKeyboard.push([58 { text: "Reseller Upgrade", callback_data: "/reseller_upgrade", style: "success", icon_custom_emoji_id: "6102856637343600044" }59 ]);60 }61 62 if (request && request.callback_query && request.callback_query.id) {63 try { Api.answerCallbackQuery({ callback_query_id: request.callback_query.id }); } catch(qErr){}64 Api.editMessageText({65 chat_id: chat.chatid,66 message_id: request.callback_query.message.message_id,67 text: welcomeMessage,68 parse_mode: "HTML",69 reply_markup: JSON.stringify({ inline_keyboard: multiColorKeyboard })70 });71 } else {72 Api.sendMessage({73 chat_id: chat.chatid,74 text: welcomeMessage,75 parse_mode: "HTML",76 reply_markup: JSON.stringify({ inline_keyboard: multiColorKeyboard })77 });78 }79 80} catch (globalException) {81 Bot.sendMessage("๐ <b>Menu Debug Error:</b> <code>" + globalException.message + "</code>", { parse_mode: "HTML" });82}