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

javascript · 61 lines

Raw
1/**#command2name: /check_users3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 👥 COMMAND: /check_users14// STATUS: 100% OPERATIONAL & ANTI-CRASH CHUNK SYSTEM15// =========================================================16 17try {18  var adminId = "8875810358"; // Aapki Admin ID19 20  // Strict Admin Validation21  if (String(chat.chatid) !== adminId) {22    Bot.sendMessage("❌ Access Denied: Sirf Owner hi user database dekh sakta hai.");23    return;24  }25 26  // Fetch users array safely27  var userList = Bot.getProperty("all_users_list") || [];28  if (!Array.isArray(userList)) { userList = []; }29 30  if (userList.length === 0) {31    Bot.sendMessage("⚠️ <b>Database Empty:</b> Bot mein abhi tak koi bhi user register nahi hua hai.", { parse_mode: "HTML" });32    return;33  }34 35  var header = "<blockquote><b>👥 TOTAL REGISTERED USERS LIST</b>\n\n" +36               "📊 <b>Total Growth Node:</b> <code>" + userList.length + " Active Users</code></blockquote>\n" +37               "━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n";38 39  var bodyText = "";40  41  // Loop through all users and format42  for (var i = 0; i < userList.length; i++) {43    var userLine = "<b>[" + (i + 1) + "]</b> ID: <code>" + userList[i] + "</code>\n";44    45    // Memory and boundary protection: Split messages if character count exceeds 350046    if ((header + bodyText + userLine).length > 3500) {47      Bot.sendMessage(header + bodyText, { parse_mode: "HTML" });48      header = ""; // Clear header for subsequent chunks49      bodyText = ""; // Reset temporary storage buffer50    }51    bodyText += userLine;52  }53 54  // Print final remaining chunk safely55  if (bodyText.trim() !== "") {56    Bot.sendMessage(header + bodyText + "\n━━━━━━━━━━━━━━━━━━━━━━━━━━", { parse_mode: "HTML" });57  }58 59} catch (err) {60  Bot.sendMessage("🛑 <b>User Audit Error:</b> <code>" + err.message + "</code>", { parse_mode: "HTML" });61}