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/_apiset.js
javascript · 20 lines
1/**#command2name: /apiset3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 var ownerId=String(Bot.getProperty("owner_id")||"8875810358"), uid=String(chat.chatid), co=Bot.getProperty("co_admin_"+uid);14 if(uid!==ownerId && !co) return;15 var id=params?String(params).trim():"", reg=Bot.getProperty("api_registry")||{};16 if(!id || !reg[id]){Bot.sendMessage("❌ Use <code>/apiset API_ID</code>",{parse_mode:"HTML"});return;}17 if(reg[id].enabled===false){Bot.sendMessage("❌ This API is disabled.");return;}18 Bot.setProperty("active_reseller_api",id,"string");19 Bot.sendMessage("✅ Active reseller API set to <code>"+id+"</code>\nAll external reseller purchases will use this API.",{parse_mode:"HTML"});20} catch(e){Bot.sendMessage("⚠️ API Set Error: "+e.message);}