mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

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

commands/rps.js

javascript · 46 lines

Raw
1/**#command2name: rps3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: rps14answer: 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}30var raw = "";31if (typeof params !== "undefined" && params) raw = String(params).trim().toLowerCase();32var u = -1;33if (raw === "سنگ" || raw === "rock" || raw === "r" || raw === "1") u = 0;34if (raw === "کاغذ" || raw === "paper" || raw === "p" || raw === "2") u = 1;35if (raw === "قیچی" || raw === "scissors" || raw === "s" || raw === "3") u = 2;36if (u < 0) u = Math.floor(Math.random() * 3);37var b = Math.floor(Math.random() * 3);38var names = ["سنگ", "کاغذ", "قیچی"];39var res = "مساوی.";40if (u === b) res = "مساوی.";41else if ((u === 0 && b === 2) || (u === 1 && b === 0) || (u === 2 && b === 1)) res = "تو بردی.";42else res = "ربات برد.";43Bot.sendMessage("تو: " + names[u] + "\nربات: " + names[b] + "\n" + res);44} catch (e) {45  Bot.sendMessage("خطا rps");46}