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/_rembal.js
javascript · 72 lines
1/**#command2name: /rembal3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12let admin_id = "8660373585"; 13 14if (user.telegramid == admin_id) {15 16 let params = (typeof message !== "undefined" && message) ? message.split(" ") : [];17 let data = params[1]; 18 19 // ✅ FIXED: same button-click bug as /addbal — ab prompt aata hai.20 if (!data || !data.includes("|")) {21 User.setProperty("rembal_step", "waiting_input", "string");22 Bot.sendMessage(23 "<tg-emoji emoji-id='5409048419211682843'>💵</tg-emoji> <b>Remove Balance</b>\n\n" +24 "<i>User ID aur amount is format me reply karein:</i>\n<code>user_id|amount</code>\n\n" +25 "<i>Example:</i> <code>8154859186|50</code>",26 {parse_mode: "HTML"}27 );28 return;29 }30 31 let splitData = data.split("|");32 let targetUserId = splitData[0].trim();33 let amountToRemove = parseFloat(splitData[1].trim());34 35 if (isNaN(amountToRemove)) {36 Bot.sendMessage("❌ *Invalid Amount!*", {parse_mode: "Markdown"});37 return;38 }39 40 try {41 // Balance remove/deduct karna42 let targetUserBalance = Libs.ResourcesLib.anotherUserRes("balance", targetUserId);43 targetUserBalance.remove(amountToRemove);44 45 // Admin notification46 Bot.sendMessage("✅ Success! Removed " + amountToRemove + " from user " + targetUserId);47 48 // New 3 Premium Emojis in Quote Style49 let notificationText = 50 "<blockquote>" +51 "<tg-emoji emoji-id='5893163582194978381'>❌</tg-emoji> Admin Remove: " + amountToRemove + "\n" +52 "<tg-emoji emoji-id='6071272104978814192'>😞</tg-emoji> Check your balance now\n" +53 "<tg-emoji emoji-id='5257963315258204021'>ℹ️</tg-emoji> Use /balance To Check" +54 "</blockquote>";55 56 // Direct Telegram API Method for instant delivery57 HTTP.post({58 url: "https://api.telegram.org/bot" + bot.token + "/sendMessage",59 body: {60 chat_id: targetUserId,61 text: notificationText,62 parse_mode: "HTML"63 }64 });65 66 } catch (err) {67 Bot.sendMessage("⚠️ *Error:* " + err.message, {parse_mode: "Markdown"});68 }69 70} else {71 Bot.sendMessage("❌ You are not authorized to use this command.");72}