mansuriamaan803/SANJEEVFFSTORE_botPublic · Bot Template
AIThis bot is a commerce platform for selling digital products, primarily focused on FreeFire accounts and related services. It provides admin tools for managing products, categories, stock, reseller roles, and a balance system for user payments. Users can browse products, apply coupons, and check their balance through an interactive interface with premium emojis and inline keyboards.
Commercecommercestoreproductsresellerbalancecoupon
102 commands0 envUpdated 12d agoCreated Aug 26, 2026
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 = "8963001413"; 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>8963001413|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}