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_how_link.js

javascript · 46 lines

Raw
1/**#command2name: /set_how_link3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🔧 ADMIN — Configure the "How To Use" video/tutorial link14// Usage: /set_how_link https://youtu.be/xxxx15// =========================================================16 17try {18  var adminId = Bot.getProperty("owner_id") || "8875810358";19  var isCoAdmin0 = Bot.getProperty("co_admin_" + String(chat.chatid));20  if (String(chat.chatid) !== adminId && !isCoAdmin0) {21    Bot.sendMessage("❌ You are not the admin!");22    return;23  }24 25  if (!params || params.trim() === "") {26    var currentLink = Bot.getProperty("how_to_use_link") || "https://youtu.be/oe2Ja08Vvpo (default)";27    Bot.sendMessage(28      "⚠️ <b>Format:</b> <code>/set_how_link https://youtu.be/xxxx</code>\n\n" +29      "<b>Current link:</b> " + currentLink,30      { parse_mode: "HTML" }31    );32    return;33  }34 35  var link = params.trim();36  if (link.indexOf("http") !== 0) {37    Bot.sendMessage("❌ Link http:// ya https:// se shuru honi chahiye!");38    return;39  }40 41  Bot.setProperty("how_to_use_link", link, "string");42  Bot.sendMessage("✅ <b>How To Use link update ho gaya:</b>\n" + link, { parse_mode: "HTML" });43 44} catch (err) {45  Bot.sendMessage("⚠️ Error: " + err.message);46}