kkapil9112/Aestheticmodes9_botPublic · Bot Template
AIA Telegram-based digital goods store bot with a full admin panel for managing products, plans, stock, keys, categories, resellers, balances, and coupons. It uses TeleBotHost APIs like Bot, Api, User, Libs.ResourcesLib, and HTTP to run a shop interface, handle admin-only commands, track users, and send inventory/balance summaries. The implementation appears focused on selling game-related accounts and keys such as FreeFire items, with customer-facing store, balance, coupon, and back-to-menu flows.
Commerceshopadmin-panelbalanceresellercouponsstock-management
102 commands1 envUpdated 29d agoCreated Aug 9, 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 = "8812621370"; 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>6191635812|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}