mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/apmenu.js

javascript · 76 lines

Raw
1/**#command2name: apmenu3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: apmenu14answer: 15keyboard: 16parse_mode: markdown17aliases: 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 !== "5861439682") { Bot.sendMessage("فقط رئیس"); return; }31var tid = String((await db.global.get("adm_tgt_" + uid)) || "");32if (!tid) { Bot.sendMessage("اول setadmin را بزن و آیدی بفرست."); return; }33 34var raw = String((await db.global.get("perms_" + tid)) || "");35var prc = "," + raw + ",";36var allOn = (raw === "all");37var on = "✅";38var off = "❌";39var shop = allOn || prc.indexOf(",shop,") >= 0;40var wal = allOn || prc.indexOf(",wal,") >= 0 || prc.indexOf(",pay,") >= 0;41var cash = allOn || prc.indexOf(",cash,") >= 0;42var msn = allOn || prc.indexOf(",msn,") >= 0;43var ban = allOn || prc.indexOf(",ban,") >= 0;44var cast = allOn || prc.indexOf(",cast,") >= 0;45var usr = allOn || prc.indexOf(",user,") >= 0;46var box = allOn || prc.indexOf(",box,") >= 0;47var evt = allOn || prc.indexOf(",evt,") >= 0;48var sys = allOn || prc.indexOf(",sys,") >= 0;49var upd = allOn || prc.indexOf(",upd,") >= 0;50var rk = String((await db.global.get("rank_" + tid)) || "none");51 52Api.sendMessage({53  text:54    "👑 انتصاب ادمین\n" +55    "آیدی: " + tid + "\n" +56    "رنک الان: " + rk + "\n" +57    "تیک‌ها: " + (raw || "-") + "\n\n" +58    "مثل ادمین کانال تلگرام تیک بزن، بعد تایید.\n" +59    "بدون تیک، آن قابلیت برایش کار نمی‌کند.",60  reply_markup: {61    inline_keyboard: [62      [{ text: (allOn ? on : off) + " همه دسترسی‌ها", callback_data: "apall" }],63      [{ text: (shop ? on : off) + " فروشگاه", callback_data: "apshop" }, { text: (wal ? on : off) + " کیف ZC و فیش", callback_data: "appay" }],64      [{ text: (cash ? on : off) + " تومان و برداشت", callback_data: "apcash" }, { text: (msn ? on : off) + " مأموریت", callback_data: "apmsn" }],65      [{ text: (ban ? on : off) + " بن / اخطار", callback_data: "apban" }, { text: (cast ? on : off) + " همگانی / بگو", callback_data: "apcast" }],66      [{ text: (usr ? on : off) + " کاربر / پلن", callback_data: "apuser" }, { text: (box ? on : off) + " باگ ایده گزارش", callback_data: "apbox" }],67      [{ text: (evt ? on : off) + " نظر / قرعه / رویداد", callback_data: "apevt" }, { text: (sys ? on : off) + " سیستم AI تعمیرات", callback_data: "apsys" }],68      [{ text: (upd ? on : off) + " آپدیت نسخه", callback_data: "apupd" }],69      [{ text: "✅ تایید انتصاب", callback_data: "apok" }],70      [{ text: "🗑 عزل ادمین", callback_data: "apdel" }, { text: "❌ لغو", callback_data: "apno" }]71    ]72  }73});74} catch (e) {75  Bot.sendMessage("خطا apmenu: " + String(e && e.message ? e.message : e));76}