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/_remstock_id.js
javascript · 52 lines
1/**#command2name: /remstock_id3answer: 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 var categories = Bot.getProperty("ff_categories") || {};17 var keyboard = [];18 var row = [];19 var count = 0;20 21 for (var slug in categories) {22 var catName = categories[slug].name || slug.toUpperCase();23 24 // Har row me 2 buttons dikhane ke liye25 row.push({ 26 text: "📁 " + catName, 27 callback_data: "/view_rem_stock " + slug 28 });29 30 count++;31 if (count % 2 === 0) {32 keyboard.push(row);33 row = [];34 }35 }36 if (row.length > 0) keyboard.push(row);37 38 if (keyboard.length === 0) {39 Bot.sendMessage("❌ System me abhi koi category nahi bani hai.");40 return;41 }42 43 Api.sendMessage({44 chat_id: adminId,45 text: "📂 <b>Select a Category to view stock for deletion:</b>",46 parse_mode: "HTML",47 reply_markup: JSON.stringify({ inline_keyboard: keyboard })48 });49 50} catch (e) {51 Bot.sendMessage("Error: " + e.message);52}