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
commands/_confirm_rem_stock.js
javascript · 49 lines
1/**#command2name: /confirm_rem_stock3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var adminId = "8875810358";14 if (String(chat.chatid) !== adminId) return;15 16 if (!params) return;17 18 // Params split karein (slug aur stock index nikalne ke liye)19 var parts = params.split(" ");20 var slug = parts[0];21 var stockIndex = parseInt(parts[1]);22 23 var currentStock = Bot.getProperty("ff_stock_" + slug) || [];24 if (!Array.isArray(currentStock) || stockIndex >= currentStock.length) {25 Bot.sendMessage("❌ Account pehle hi delete ho chuka hai ya nahi mila.");26 return;27 }28 29 // Target account ka data store karein report ke liye30 var deletedAccount = currentStock[stockIndex];31 32 // Array se us specific index ko delete karein33 currentStock.splice(stockIndex, 1);34 35 // Database me updated array save karein36 Bot.setProperty("ff_stock_" + slug, currentStock, "json");37 38 // Success message confirmation ke sath39 Bot.sendMessage("🗑 <b>Stock Deleted Successfully!</b>\n\n• <b>Category:</b> " + slug.toUpperCase() + "\n• <b>Removed Data:</b> <code>" + deletedAccount + "</code>", {parse_mode: "HTML"});40 41 // Stock list ko refresh karne ke liye auto-run karein taaki updated list dikhe42 Bot.run({43 command: "/view_rem_stock",44 options: { params: slug }45 });46 47} catch (e) {48 Bot.sendMessage("Error: " + e.message);49}