pnxh2371/Ankit_mods_store_botPublic ยท Bot Template
AI๐ษดแดษชแด ๐แดแด ๊ฑ ๐แดแดสแด ๐ appears to be a Telegram automation bot. Commands include /*, /addbal, /addbal_all, /addbal_binance, /addbal_binance_approve, /addbal_binance_paid, /addbal_upi, /addcat_id. Observed in code: messaging, http, libs, keyboards, payments.
Utilityutility
133 commands0 envUpdated 8h agoCreated Sep 10, 2026
commands/_coupons.js
javascript ยท 65 lines
1/**#command2name: /coupons3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// ๐ ADMIN/CO-ADMIN โ View all coupons with usage stats + Pause/Resume/Delete14// =========================================================15 16try {17 var ownerId = Bot.getProperty("owner_id") || "6182067327";18 var requesterId = String(user.telegramid);19 var isCoAdmin = Bot.getProperty("co_admin_" + requesterId);20 if (requesterId !== String(ownerId) && !isCoAdmin) {21 Bot.sendMessage("โ Restricted command!");22 return;23 }24 25 var couponList = Bot.getProperty("coupon_list") || [];26 27 if (couponList.length === 0) {28 Bot.sendMessage("<blockquote>๐ <b>No coupons created yet.</b>\n<i>Use /gencoupon to create one.</i></blockquote>", { parse_mode: "HTML" });29 return;30 }31 32 var text = "<blockquote>๐ <b>ALL COUPONS</b></blockquote>\nโโโโโโโโโโโโโโโโโโโโโ\n\n";33 var buttons = [];34 35 for (var i = 0; i < couponList.length; i++) {36 var code = couponList[i];37 var c = Bot.getProperty("coupon_" + code);38 if (!c) continue;39 40 var claimedCount = Array.isArray(c.claimedBy) ? c.claimedBy.length : 0;41 var statusLabel = c.isPaused ? "โธ Paused" : "โ
Active";42 var scopeLabel = c.scope === "global" ? "๐ Global" : "๐ฆ " + (c.productName || "?") + " (" + (c.duration || "?") + ")";43 44 text += "๐ท <b>" + code + "</b> โ " + statusLabel + "\n" +45 "๐ธ " + c.discountPercent + "% off | ๐ฅ " + claimedCount + "/" + c.maxClaims + " claimed\n" +46 scopeLabel + "\n\n";47 48 buttons.push([49 { text: (c.isPaused ? "โถ Resume" : "โธ Pause") + " " + code, callback_data: "/pause_coupon " + code, style: c.isPaused ? "success" : "primary" },50 { text: "๐ Delete " + code, callback_data: "/delete_coupon " + code, style: "danger" }51 ]);52 }53 54 buttons.push([{ text: "Back to Admin Panel", callback_data: "/admin", style: "default", icon_custom_emoji_id: "5893163582194978381" }]);55 56 Api.sendMessage({57 chat_id: chat.chatid,58 text: text,59 parse_mode: "HTML",60 reply_markup: JSON.stringify({ inline_keyboard: buttons })61 });62 63} catch (err) {64 Bot.sendMessage("โ ๏ธ Error: " + err.message);65}