devbro468/Dev_x_store_botPublic · Bot Template

AIThis bot operates a digital storefront (DEV X STORE) selling subscription-based products — likely game hacks, accounts, or access keys — categorized by platform (Android Root, Non-Root, iPhone). It features a reseller program with discounted pricing, a dual-currency wallet (INR balance + Telegram Stars/XTR), and a full admin/co-admin panel for managing products, plans, per-plan pricing, stock (keys/accounts), coupons, and API endpoints. Purchases flow through a plan selection screen offering wallet payment, Stars invoices (sendInvoice with XTR currency), and coupon application. Successful Stars payments are handled via successful_payment webhook, crediting wallet or delivering keys directly. Admin tools include user listing with chunked messaging, stock viewing/deletion with inline keyboards, co-admin management, and API registry updates. The bot registers users on first interaction and

Commercecommercedigital-goodsstars-paymentreseller-systemadmin-panelstock-management
ProfileTelegram
119 commands0 envUpdated 15d agoCreated Aug 23, 2026
Back to folder

commands/_removeproduct.js

javascript · 54 lines

Raw
1/**#command2name: /removeproduct3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var adminId = "8875810358"; // Aapki Admin ID14  if (String(chat.chatid) !== adminId) {15    Bot.sendMessage("❌ You are not the admin!");16    return;17  }18 19  // Database se existing products fetch karna20  var productList = Bot.getProperty("stored_products") || [];21 22  if (productList.length === 0) {23    Bot.sendMessage("❌ <b>Database me koi product nahi mila!</b> Remove karne ke liye pehle product add karein.", { parse_mode: "HTML" });24    return;25  }26 27  var inlineButtons = [];28 29  // Saare products ke dynamic buttons loop se banana30  for (var i = 0; i < productList.length; i++) {31    var product = productList[i];32    if (!product || !product.name) continue;33 34    inlineButtons.push([35      {36        text: "🗑️ Remove: " + product.name.toUpperCase(),37        // Callback data me array index number pass karna38        callback_data: "/confirm_rem_prod " + i39      }40    ]);41  }42 43  var menuText = "<blockquote><b>🗑️ CHOOSE PRODUCT TO REMOVE</b>\n\n" +44                 "• <b>Total Registered:</b> <code>" + productList.length + " Products</code>\n\n" +45                 "<i>Niche diye gaye buttons me se jis product ko poori tarah delete karna hai, uspar click karein:</i></blockquote>";46 47  Bot.sendMessage(menuText, {48    parse_mode: "HTML",49    reply_markup: JSON.stringify({ inline_keyboard: inlineButtons })50  });51 52} catch (err) {53  Bot.sendMessage("⚠️ Remove Product Menu Error: " + err.message);54}