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/_custom_stars_amount.js
javascript · 33 lines
1/**#command2name: /custom_stars_amount3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// ⭐ "Custom Amount" button — asks user to type a Stars amount14// (reply handled in _start.js MODULE 5)15// =========================================================16 17try {18 User.setProperty("awaiting_stars_amount", true, "boolean");19 20 var text = "<blockquote>⭐ <b>ENTER STARS AMOUNT</b></blockquote>\n\n<i>Kitne Stars deposit karne hain? Number type karke bhejein (e.g. 150)</i>";21 22 if (request && request.message && !request.message.photo) {23 Api.editMessageText({ chat_id: String(chat.chatid), message_id: Number(request.message.message_id), text: text, parse_mode: "HTML" });24 } else {25 Api.sendMessage({ chat_id: chat.chatid, text: text, parse_mode: "HTML" });26 }27 28 var queryId = request ? (request.id || (request.callback_query && request.callback_query.id)) : null;29 if (queryId) { try { Api.answerCallbackQuery({ callback_query_id: String(queryId) }); } catch (e) {} }30 31} catch (err) {32 Bot.sendMessage("⚠️ Error: " + err.message);33}