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/_set_support_link.js

javascript · 58 lines

Raw
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") || "8875810358";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}