mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/pvpc.js

javascript · 69 lines

Raw
1/**#command2name: pvpc3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: pvpc14answer: 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) return;31var gift = await db.global.get("wal_gift_" + uid);32if (!gift) {33  await db.global.set("wal_gift_" + uid, "1");34  var c0 = parseInt(await db.global.get("wal_" + uid) || 0) || 0;35  await db.global.set("wal_" + uid, c0 + 10000);36}37var cost = 2000;38var bal = parseInt(await db.global.get("wal_" + uid) || 0) || 0;39if (bal < cost) { Bot.sendMessage("حداقل ۲۰۰۰. کیف: " + bal); return; }40 41var wait = String((await db.global.get("pvpq_coin")) || "");42if (wait && wait === uid) {43  Bot.sendMessage("تو صف سکه‌ای. لینک دعوت را بفرست یا لغو کن.");44  return;45}46if (wait && wait !== uid) {47  await db.global.set("pvp_inv_" + uid, wait + "|coin");48  Bot.runCommand("pvpok");49  return;50}51 52await db.global.set("pvpq_coin", String(uid));53var bname = "ZorenixAI_bot";54try { if (typeof bot !== "undefined" && bot && bot.username) bname = String(bot.username); } catch (eB) {}55var link = "https://t.me/" + bname + "?start=pvpc_" + uid;56var share = "https://t.me/share/url?url=" + link.split("?").join("%3F");57Api.sendMessage({58  text: "⚔️ سکه vs پلیر\nهر طرف ۲۰۰۰.\nکسی تو صف نبود. لینک را بگذار گپ؛ با تایید طرف بازی شروع می‌شود.\nلینک را تایپ نکن — دکمه بفرست.",59  reply_markup: {60    inline_keyboard: [61      [{ text: "📤 بفرست تو گپ", url: share }],62      [{ text: "🔗 باز کردن لینک دعوت", url: link }],63      [{ text: "❌ لغو صف", callback_data: "pvpx" }, { text: "🎮 بازی‌ها", callback_data: "games" }]64    ]65  }66});67} catch (e) {68  Bot.sendMessage("خطا pvpc");69}