mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/duo.js

javascript · 100 lines

Raw
1/**#command2name: duo3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: duo14answer: 15keyboard: 16parse_mode: 17aliases: 18allow_only_group: false19need_reply: false20is_web: 021#command**/22 23try {24try { Api.answerCallbackQuery({}); } catch (e0) {}25 26var uid = "";27if (typeof user !== "undefined" && user) {28  if (user.telegramid) uid = String(user.telegramid);29  else if (user.id) uid = String(user.id);30}31if (!uid) { Bot.sendMessage("uid نیست"); return; }32 33var other = "";34try { other = String((await db.global.get("pair_with_" + uid)) || ""); } catch (e1) { other = ""; }35other = String(other).replace(/[^0-9]/g, "");36try { await db.global.set("pair_with_" + uid, ""); } catch (e2) {}37 38var bname = "ZorenixAI_bot";39try {40  if (typeof bot !== "undefined" && bot && bot.username) bname = String(bot.username);41} catch (e3) {}42var myLink = "https://t.me/" + bname + "?start=pair_" + uid;43var share = "https://t.me/share/url?url=" + encodeURIComponent(myLink);44var kb = {45  inline_keyboard: [46    [{ text: "📋 کپی لینک", copy_text: { text: myLink } }],47    [{ text: "📤 بفرست", url: share }],48    [{ text: "🔗 باز کردن لینک", url: myLink }]49  ]50};51 52if (other && other !== uid) {53  var n1 = parseInt(String(uid).slice(-7)) || 1;54  var n2 = parseInt(String(other).slice(-7)) || 1;55  var pct = 41 + ((n1 + n2) % 58);56  var line = "یه جرقه هست.";57  if (pct >= 90) line = "شما دوتا یک روحید.";58  else if (pct >= 80) line = "ترکیب ترکوندن.";59  else if (pct >= 70) line = "با هم میخندید و دعوا میکنید.";60  else if (pct >= 60) line = "رفیق خوب یا عشق در راه.";61  else if (pct >= 50) line = "شیمی هست.";62  else line = "سرد شروع میشه داغ تموم میشه.";63 64  var card = "تست دو نفره زورنیکس\nسازگاری: " + pct + " درصد\n" + line + "\n\nدکمه کپی یا بفرست را بزن.";65  try {66    Api.sendMessage({ text: card, reply_markup: kb });67  } catch (e5) {68    Bot.sendMessage(card);69  }70  try {71    var ol = "https://t.me/" + bname + "?start=pair_" + other;72    Api.sendMessage({73      chat_id: other,74      text: "یکی لینک تست تو را زد.\nسازگاری: " + pct + " درصد\n" + line,75      reply_markup: {76        inline_keyboard: [77          [{ text: "📋 کپی لینک من", copy_text: { text: ol } }],78          [{ text: "📤 بفرست", url: "https://t.me/share/url?url=" + encodeURIComponent(ol) }],79          [{ text: "🔗 باز کردن", url: ol }]80        ]81      }82    });83  } catch (e4) {}84  return;85}86 87try {88  Api.sendMessage({89    text: "تست دو نفره\n\nبرای رفیق/کرش بفرست. تا استارت نزنه نتیجه نمیاد.\nاز دکمه کپی یا بفرست استفاده کن.",90    reply_markup: kb91  });92} catch (e6) {93  Api.sendMessage({94    text: "تست دو نفره — دکمه بفرست را بزن.",95    reply_markup: { inline_keyboard: [[{ text: "📤 بفرست", url: share }], [{ text: "🔗 باز کردن", url: myLink }]] }96  });97}98} catch (e) {99  Bot.sendMessage("خطا duo: " + String(e && e.message ? e.message : e));100}