indrajitghosh20006/Testseller_01botPublic · Bot Template
AIThis bot provides an admin‑controlled system for managing user balances, products, and reseller roles. It includes commands to add balances (via manual input, Binance Pay, or UPI), approve and credit payments, and set up product listings with categories and pricing. Admins can also add resellers, view reseller info, and manage stock entries. The bot uses built‑in TeleBotHost APIs such as Bot, Api, HTTP, and Libs for database operations and message handling.
Commerceadminbalanceproductresellerpaymentsbinance
138 commands0 envUpdated 17h agoCreated Sep 27, 2026
commands/_set_support_link.js
javascript · 58 lines
1/**#command2name: /set_support_link3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🔧 ADMIN — Configure the "Support" section's admin contact link14// Usage: /set_support_link @your_username15// or /set_support_link https://t.me/your_username16// =========================================================17 18try {19 var adminId = Bot.getProperty("owner_id") || "7839151435";20 var isCoAdmin0 = Bot.getProperty("co_admin_" + String(chat.chatid));21 if (String(chat.chatid) !== adminId && !isCoAdmin0) {22 Bot.sendMessage("❌ You are not the admin!");23 return;24 }25 26 if (!params || params.trim() === "") {27 var currentLink = Bot.getProperty("support_link") || "https://t.me/Dev_Modz_Owner (default)";28 Bot.sendMessage(29 "⚠️ <b>Format:</b> <code>/set_support_link @your_username</code>\n" +30 "<i>ya poora link bhi bhej sakte hain:</i> <code>/set_support_link https://t.me/your_username</code>\n\n" +31 "<b>Current link:</b> " + currentLink,32 { parse_mode: "HTML" }33 );34 return;35 }36 37 var input = params.trim();38 var link;39 40 // ✅ Admin sirf apna @username bhi bhej sakta hai — automatically41 // https://t.me/username link ban jaayegi. Poora link bhi accept hota hai.42 if (input.indexOf("http") === 0) {43 link = input;44 } else {45 var cleanUsername = input.replace(/^@/, "").trim();46 if (!cleanUsername) {47 Bot.sendMessage("❌ Valid username ya link bhejein!");48 return;49 }50 link = "https://t.me/" + cleanUsername;51 }52 53 Bot.setProperty("support_link", link, "string");54 Bot.sendMessage("✅ <b>Support contact link update ho gaya:</b>\n" + link, { parse_mode: "HTML" });55 56} catch (err) {57 Bot.sendMessage("⚠️ Error: " + err.message);58}