ayushyadav7970824760/goldensellingstore_botPublic · Bot Template
AIThis Telegram store bot lets customers browse digital products and plans, apply coupons, add funds via UPI, and receive purchased keys. It includes a full admin panel for managing products, reordering items, setting reseller prices, viewing and removing key stock, configuring UPI payment details and update links, and checking user balances. Co-admins and resellers are supported, and support tickets are forwarded to the admin.
Commercedigital_storeadmin_panelupi_paymentsresellercouponskey_stock
146 commands0 envUpdated 2d agoCreated Sep 5, 2026
commands/_addfund.js
javascript · 105 lines
1/**#command2name: /addfund3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 💰 COMMAND = Initial Deposit Keypad Setup14// STATUS: ✅ PREMIUM CALCULATOR UI — colored buttons + premium emojis15// (kept in sync with /press.js so the screen never "flickers"/changes16// style when the user presses the first digit)17// =========================================================18 19try {20 // Amount ko shuru me 0 set karein21 User.setProperty("deposit_amount", "0", "string");22 23 // 💎 Premium Emoji Set — user-provided premium IDs applied across this screen24 let e_money = "<tg-emoji emoji-id='6312263493051489212'>💰</tg-emoji>";25 let e_clear = "<tg-emoji emoji-id='5348224471050238603'>✏</tg-emoji>";26 let e_confirm = "<tg-emoji emoji-id='5348191451341668809'>✅</tg-emoji>";27 let e_back = "<tg-emoji emoji-id='5893163582194978381'>⬅️</tg-emoji>";28 let e_hour = "<tg-emoji emoji-id='6100657257605763582'>✔️</tg-emoji>";29 let e_check = "<tg-emoji emoji-id='6311870645277825763'>✔️</tg-emoji>";30 31 // 🎨 Main message — premium "Enter Custom Amount" calculator screen32 let msg =33 "<blockquote>" + e_money + " <b>ADD BALANCE — ENTER AMOUNT</b> <tg-emoji emoji-id='6312263493051489212'>💎</tg-emoji></blockquote>\n" +34 "━━━━━━━━━━━━━━━━━━━━━\n\n" +35 "💰 <b>Deposit Amount</b>\n" +36 "<blockquote><code>₹ 0.00</code></blockquote>\n\n" +37 "━━━━━━━━━━━━━━━━━━━━━\n" +38 e_check + " <i>Instant Auto-Credit</i>\n" +39 "<tg-emoji emoji-id='6215386799133433653'>🔒</tg-emoji> <i>100% Secure UPI Payment</i>\n" +40 e_hour + " <i>Verified in Seconds</i>\n\n" +41 "<tg-emoji emoji-id='6100170496077204999'>👑</tg-emoji> <i>Enter your amount using the keypad below.</i>";42 43 // 🎨 Styled keyboard payload — RED number pad, premium custom emojis44 let keyboard = [45 [46 { text: "1", callback_data: "/press 1", style: "success", icon_custom_emoji_id: "6267068789146260253" },47 { text: "2", callback_data: "/press 2", style: "success", icon_custom_emoji_id: "6267068789146260253" },48 { text: "3", callback_data: "/press 3", style: "success", icon_custom_emoji_id: "6267068789146260253" }49 ],50 [51 { text: "4", callback_data: "/press 4", style: "success", icon_custom_emoji_id: "6267068789146260253" },52 { text: "5", callback_data: "/press 5", style: "success", icon_custom_emoji_id: "6267068789146260253" },53 { text: "6", callback_data: "/press 6", style: "success", icon_custom_emoji_id: "6267068789146260253" }54 ],55 [56 { text: "7", callback_data: "/press 7", style: "success", icon_custom_emoji_id: "6267068789146260253" },57 { text: "8", callback_data: "/press 8", style: "success", icon_custom_emoji_id: "6267068789146260253" },58 { text: "9", callback_data: "/press 9", style: "success", icon_custom_emoji_id: "6267068789146260253" }59 ],60 [61 { text: "🧹 Clear", callback_data: "/press clear", style: "danger", icon_custom_emoji_id: "5348224471050238603" },62 { text: "0", callback_data: "/press 0", style: "success" },63 { text: "✅ Confirm", callback_data: "/press confirm", style: "success" }64 ],65 [66 { text: "Back", callback_data: "/back", style: "danger" }67 ]68 ];69 70 // 'request.message' check karta hai ki kya ye kisi button click se trigger hua hai71 // ✅ BUG FIX: agar previous message ek PHOTO thi (jaise DP-attached Profile),72 // editMessageText kaam nahi karta — isi wajah se Profile se "Add Fund" click73 // karne par deposit screen aati hi nahi thi. Ab photo ho to delete + fresh send.74 if (request && request.message && request.message.message_id) {75 if (request.message.photo) {76 try { Api.deleteMessage({ chat_id: chat.chatid, message_id: request.message.message_id }); } catch (delErr) {}77 Api.sendMessage({78 chat_id: chat.chatid,79 text: msg,80 parse_mode: "HTML",81 reply_markup: JSON.stringify({ inline_keyboard: keyboard })82 });83 } else {84 // Alag se naya message nahi bhejega, usi menu ko edit karke keypad bana dega85 Api.editMessageText({86 chat_id: chat.chatid,87 message_id: request.message.message_id,88 text: msg,89 parse_mode: "HTML",90 reply_markup: JSON.stringify({ inline_keyboard: keyboard })91 });92 }93 } else {94 // Agar direct command run hua toh naya message bhejega safety ke liye95 Api.sendMessage({96 chat_id: chat.chatid,97 text: msg,98 parse_mode: "HTML",99 reply_markup: JSON.stringify({ inline_keyboard: keyboard })100 });101 }102 103} catch (err) {104 Bot.sendMessage("⚠️ System Error: " + err.message);105}