ayushyadav7970824760/goldensellingstore_botPublic · Bot Template
AIThis Telegram store bot lets customers browse digital products and plans, apply coupons, add funds via UPI, and receive purchased keys. It includes a full admin panel for managing products, reordering items, setting reseller prices, viewing and removing key stock, configuring UPI payment details and update links, and checking user balances. Co-admins and resellers are supported, and support tickets are forwarded to the admin.
Commercedigital_storeadmin_panelupi_paymentsresellercouponskey_stock
146 commands0 envUpdated 2d agoCreated Sep 5, 2026
commands/_confirm_rem_prod.js
javascript · 68 lines
1/**#command2name: /confirm_rem_prod3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var adminId = "8477746023";14 if (String(chat.chatid) !== adminId) return;15 16 var callbackId = request ? request.id : null;17 var targetIndex = params ? Number(params.trim()) : -1;18 19 if (targetIndex === -1 || isNaN(targetIndex)) {20 if (callbackId) Api.answerCallbackQuery({ callback_query_id: callbackId, text: "❌ Invalid product data index!", show_alert: true });21 return;22 }23 24 var productList = Bot.getProperty("stored_products") || [];25 26 if (productList.length === 0 || targetIndex >= productList.length) {27 if (callbackId) {28 Api.answerCallbackQuery({ callback_query_id: callbackId, text: "❌ Product already removed or missing!", show_alert: true });29 }30 return;31 }32 33 // Target product ko data array se nikalna (Delete execution)34 var removedProduct = productList[targetIndex];35 var removedName = removedProduct.name;36 37 productList.splice(targetIndex, 1); // Array modification38 39 // Updated array registry ko re-save karna40 Bot.setProperty("stored_products", productList, "json");41 42 var successText = "<blockquote><b>🗑️ PRODUCT SUCCESSFULLY REMOVED</b>\n\n" +43 "• <b>Product Name:</b> <code>" + removedName.toUpperCase() + "</code>\n" +44 "• <b>Status:</b> Completely wiped from database matrix.\n" +45 "• <b>Remaining Products:</b> <code>" + productList.length + " Left</code></blockquote>";46 47 // Message window ko live text update edit dena48 if (request && request.message) {49 HTTP.post({50 url: "https://api.telegram.org/bot" + bot.token + "/editMessageText",51 body: {52 chat_id: String(chat.chatid),53 message_id: Number(request.message.message_id),54 text: successText,55 parse_mode: "HTML"56 }57 });58 } else {59 Bot.sendMessage(successText, { parse_mode: "HTML" });60 }61 62 if (callbackId) {63 Api.answerCallbackQuery({ callback_query_id: callbackId, text: "✅ Product Wiped!" });64 }65 66} catch (err) {67 Bot.sendMessage("⚠️ Execution Error: " + err.message);68}