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/_view_rem_stock.js
javascript · 55 lines
1/**#command2name: /view_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 // Callback data se slug nikalna17 var slug = params ? params.trim() : "";18 if (!slug) return;19 20 var currentStock = Bot.getProperty("ff_stock_" + slug) || [];21 var categories = Bot.getProperty("ff_categories") || {};22 var catName = categories[slug] && categories[slug].name ? categories[slug].name : slug.toUpperCase();23 24 if (!Array.isArray(currentStock) || currentStock.length === 0) {25 Bot.sendMessage("📭 <b>" + catName + "</b> me abhi koi stock mojud nahi hai.", {parse_mode: "HTML"});26 return;27 }28 29 var keyboard = [];30 31 // Har ek account ke liye ek button banayein32 for (var i = 0; i < currentStock.length; i++) {33 var accountData = currentStock[i]; // Format: email|pass|price34 35 keyboard.push([36 { 37 text: "❌ " + accountData, 38 callback_data: "/confirm_rem_stock " + slug + " " + i 39 }40 ]);41 }42 43 // Wapis main list par jaane ke liye Back button44 keyboard.push([{ text: "🔙 Back to Categories", callback_data: "/remstock_id" }]);45 46 Api.sendMessage({47 chat_id: adminId,48 text: "🛒 <b>" + catName + " Stock List:</b>\n\n<i>Niche diye gaye kisi bhi account button par click karke use delete karein:</i>",49 parse_mode: "HTML",50 reply_markup: JSON.stringify({ inline_keyboard: keyboard })51 });52 53} catch (e) {54 Bot.sendMessage("Error: " + e.message);55}