millswelbeck148/SireimadeBotPublic · Bot Template

AISireImade appears to be a Telegram automation bot. Commands include /start, /about, /support, /id, /admin, /ban, /unban, /x. Observed in code: messaging, keyboards, games.

Utilityutility
ProfileTelegram
112 commands3 envUpdated 1h agoCreated Aug 27, 2026
Back to folder

commands/_choose.js

javascript · 131 lines

Raw
1/**#command2name: /choose3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12var chatId = String(request.chat.id);13var userId = String(user.id);14var choice = String(params).toLowerCase().trim();15 16var key = "AURA_GAME_" + chatId;17var game = Bot.getProperty(key);18 19if (!game) {20  Bot.sendMessage("❌ There is no Aura battle happening.");21  return;22}23 24if (userId != game.player1 && userId != game.player2) {25  Bot.sendMessage("❌ You're not part of this battle.");26  return;27}28 29if (choice != "rock" && choice != "paper" && choice != "scissors") {30  Bot.sendMessage(31    "❌ Invalid choice.\n\n" +32    "Use:\n" +33    "/choose rock\n" +34    "/choose paper\n" +35    "/choose scissors"36  );37  return;38}39 40if (userId == game.player1) {41  if (game.choice1) {42    Bot.sendMessage("⚠️ You already chose.");43    return;44  }45 46  game.choice1 = choice;47} else {48  if (game.choice2) {49    Bot.sendMessage("⚠️ You already chose.");50    return;51  }52 53  game.choice2 = choice;54}55 56Bot.setProperty(key, game, "json");57 58Bot.sendMessage("🔒 Choice locked. Waiting for the other player...");59 60if (!game.choice1 || !game.choice2) {61  return;62}63 64// ===============================65// BOTH PLAYERS HAVE CHOSEN66// ===============================67 68var p1 = game.choice1;69var p2 = game.choice2;70 71var winner = null;72 73if (p1 == p2) {74  winner = "draw";75} else if (76  (p1 == "rock" && p2 == "scissors") ||77  (p1 == "paper" && p2 == "rock") ||78  (p1 == "scissors" && p2 == "paper")79) {80  winner = game.player1;81} else {82  winner = game.player2;83}84 85// ===============================86// DRAW87// ===============================88 89if (winner == "draw") {90  Bot.sendMessage(91    "🤝 <b>DRAW</b>\n\n" +92    "Both players chose the same thing.\n" +93    "No Aura gained.",94    {parse_mode: "HTML"}95  );96 97  Bot.setProperty(key, null);98  return;99}100 101// ===============================102// GIVE AURA103// ===============================104 105var auraKey = "AURA_" + winner;106var aura = Bot.getProperty(auraKey);107 108if (!aura) {109  aura = 0;110}111 112aura = Number(aura) + 10;113 114Bot.setProperty(auraKey, aura, "integer");115 116// ===============================117// RESULT118// ===============================119 120var winnerName = winner == game.player1 ? "Player 1" : "Player 2";121 122Bot.sendMessage(123  "⚔️ <b>AURA BATTLE COMPLETE</b>\n\n" +124  "Player 1 chose: <b>" + p1 + "</b>\n" +125  "Player 2 chose: <b>" + p2 + "</b>\n\n" +126  "🏆 <b>" + winnerName + " WINS!</b>\n" +127  "✨ <b>+10 Aura</b>",128  {parse_mode: "HTML"}129);130 131Bot.setProperty(key, null);