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/_balance.js
javascript · 50 lines
1/**#command2name: /balance3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13 // Current user ka balance nikalna14 let userBalance = Libs.ResourcesLib.userRes("balance").value();15 16 // Premium Emojis ke saath text (Quote Style me)17 let text = "<blockquote>" +18 "<tg-emoji emoji-id='6057881002540274780'>💀</tg-emoji> Your Balance: " + userBalance + " \n" +19 "<tg-emoji emoji-id='6192842983948162969'>ℹ️</tg-emoji> Account Status: Active\n" +20 "<tg-emoji emoji-id='6194729398009075708'>✨</tg-emoji> Keep Shopping!" +21 "</blockquote>";22 23 // Inline Keyboard layout jisme Colored (Primary) Button aur Nayi Custom Emoji ID set hai24 let keyboard = {25 inline_keyboard: [26 [27 {28 text: "Back To Menu",29 callback_data: "/back", 30 style: "primary", // Blue (Primary) Button Color31 icon_custom_emoji_id: "5893163582194978381" // Nayi Custom Emoji ID button ke liye32 }33 ]34 ]35 };36 37 // Direct Telegram API Call38 HTTP.post({39 url: "https://api.telegram.org/bot" + bot.token + "/sendMessage",40 body: {41 chat_id: chat.chatid,42 text: text,43 parse_mode: "HTML",44 reply_markup: JSON.stringify(keyboard)45 }46 });47 48} catch (err) {49 Bot.sendMessage("⚠️ *Error:* " + err.message, { parse_mode: "Markdown" });50}