mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

Utilityutility
ProfileTelegram
455 commands2 envUpdated 7h agoCreated Aug 26, 2026
Back to folder

commands/joingate.js

javascript · 84 lines

Raw
1/**#command2name: joingate3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: joingate14answer: 15keyboard: 16parse_mode: 17aliases: 18allow_only_group: false19need_reply: false20is_web: 021#command**/22 23try {24try { Api.answerCallbackQuery({}); } catch (e0) {}25var uid = "";26var uidB = "";27if (typeof user !== "undefined" && user) {28  if (user.telegramid) uid = String(user.telegramid);29  if (user.id) uidB = String(user.id);30}31if (!uid && uidB) uid = uidB;32if (!uid) return;33 34var isBoss = (uid === "5861439682") || (uidB === "5861439682");35var isAdmin = isBoss || ((await db.global.get("rank_" + uid)) === "admin");36if (isAdmin) {37  await db.global.set("join_ok_" + uid, "3");38  if (uidB) await db.global.set("join_ok_" + uidB, "3");39  try { Bot.runCommand("/start"); } catch (eA) {}40  return;41}42 43var chs = ["@ZorenixStudio", "@ZorenixFF", "@ZorenixNews"];44var labs = ["ZorenixStudio", "ZorenixFF", "ZorenixNews"];45var links = ["https://t.me/ZorenixStudio", "https://t.me/ZorenixFF", "https://t.me/ZorenixNews"];46var allOk = true;47var lines = "";48var rows = [];49var ci = 0;50for (ci = 0; ci < 3; ci++) {51  var mem = false;52  try {53    var res = await Api.getChatMember({ chat_id: chs[ci], user_id: uid });54    var st = "";55    if (res && res.result && res.result.status) st = String(res.result.status);56    else if (res && res.status) st = String(res.status);57    if (st === "member" || st === "administrator" || st === "creator" || st === "restricted") mem = true;58  } catch (e1) {}59  if (!mem) allOk = false;60  var mark = mem ? "✅ عضو" : "❌ عضو نیستی";61  lines = lines + (ci + 1) + ") " + chs[ci] + "\n" + mark + "\n\n";62  rows.push([{ text: (mem ? "✅ " : "➕ ") + labs[ci], url: links[ci] }]);63}64 65if (allOk) {66  await db.global.set("join_ok_" + uid, "3");67  if (uidB) await db.global.set("join_ok_" + uidB, "3");68  try { Bot.runCommand("/start"); } catch (e2) {}69  return;70}71 72rows.push([{ text: "✅ تایید عضویت هر ۳ کانال", callback_data: "check_join" }]);73 74Api.sendMessage({75  text:76    "✦ عضویت اجباری زورنیکس\n" +77    "───────────────\n" +78    "برای ورود باید عضو هر ۳ کانال باشی.\n" +79    "حتی اگر قبلاً Studio را داشتی، FF و News هم لازم است.\n\n" +80    lines +81    "ترتیب:\n۱) هر کانال قرمز را بزن و عضو شو\n۲) برگرد همین‌جا\n۳) تایید عضویت را بزن",82  reply_markup: { inline_keyboard: rows }83});84} catch (e) { Bot.sendMessage("خطا joingate"); }