mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/cln.js

javascript · 65 lines

Raw
1/**#command2name: cln3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: cln14answer: 15keyboard: 16parse_mode: 17aliases: 18allow_only_group: false19need_reply: false20is_web: 021#command**/22 23try {24try { Api.answerCallbackQuery({}); } catch (e0) {}25var uid = "";26if (typeof user !== "undefined" && user) {27  if (user.telegramid) uid = String(user.telegramid);28  else if (user.id) uid = String(user.id);29}30if (!uid) return;31 32var cid = String((await db.global.get("clan_of_" + uid)) || "");33if (!cid) {34  Api.sendMessage({35    text: "🏰 کلن\n───────────────\nعضو هیچ کلنی نیستی.\nلیدر بساز یا منتظر دعوت عددی باش.",36    reply_markup: { inline_keyboard: [37      [{ text: "➕ ساخت کلن", callback_data: "clnmk" }],38      [{ text: "🏆 برترین کلن‌ها", callback_data: "clntop" }],39      [{ text: "✨ پلاس", callback_data: "plus" }]40    ] }41  });42  return;43}44var cl = {};45try { cl = JSON.parse(String((await db.global.get("clan_" + cid)) || "{}")); } catch (eC) { cl = {}; }46var mem = cl.M;47if (!mem || typeof mem.length !== "number") mem = [];48var role = "👥 Member";49if (String(cl.L) === uid) role = "👑 Leader";50else if (String(cl.C) === uid) role = "🛡️ Co-Leader";51var chatOn = String((await db.global.get("plus_mode_" + uid)) || "") === "clnmsg";52Api.sendMessage({53  text:54    "🏰 " + String(cl.n || "کلن") + "\n───────────────\n" +55    role + "\nXP کلن: " + (parseInt(cl.xp) || 0) + "\nاعضا: " + mem.length + "/15\n" +56    (chatOn ? "چت کلن روشن است. پیام بفرست." : "چت خاموش. دکمه چت را بزن."),57  reply_markup: { inline_keyboard: [58    [{ text: "💬 چت کلن", callback_data: "clnchat" }, { text: "🧠 کوییز کلن", callback_data: "clnq" }],59    [{ text: "➕ دعوت با آیدی", callback_data: "clninv" }, { text: "🎖 ست رنک", callback_data: "clnrk" }],60    [{ text: "🏆 برترین کلن‌ها", callback_data: "clntop" }, { text: "🚪 خروج", callback_data: "clnlv" }],61    [{ text: "✨ پلاس", callback_data: "plus" }]62  ] }63});64 65} catch (e) { Bot.sendMessage("خطا cln"); }