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

Commercecommercedigital-goodsstars-paymentreseller-systemadmin-panelstock-management
ProfileTelegram
119 commands0 envUpdated 15d agoCreated Aug 23, 2026
Back to folder

commands/_gencoupon.js

javascript · 35 lines

Raw
1/**#command2name: /gencoupon3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🎟 ADMIN — Coupon Generator Wizard (Step 1: kicks off in _start.js MODULE 3)14// =========================================================15 16try {17  var adminId = Bot.getProperty("owner_id") || "8875810358";18  var isCoAdmin0 = Bot.getProperty("co_admin_" + String(chat.chatid));19  if (String(chat.chatid) !== adminId && !isCoAdmin0) {20    Bot.sendMessage("❌ You are not the admin!");21    return;22  }23 24  User.setProperty("coupon_gen_step", "code", "string");25 26  Bot.sendMessage(27    "<blockquote>🎟 <b>COUPON GENERATOR</b></blockquote>\n\n" +28    "<tg-emoji emoji-id='6080214566191505147'>🏷</tg-emoji> <b>Coupon code kya rakhna hai?</b>\n" +29    "<i>Type karke bhejein, jaise: SAVE10</i>",30    { parse_mode: "HTML" }31  );32 33} catch (err) {34  Bot.sendMessage("⚠️ Error: " + err.message);35}