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 2h agoCreated Aug 27, 2026
Back to folder

commands/_roulette.js

javascript · 546 lines

Raw
1/**#command2name: /roulette3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 💜 GIFT AI — /ROULETTE14// SUSPENSE ROULETTE SYSTEM15//16// • /roulette17// • /roulette @username18// • Reply to someone + /roulette19// • Sends LOADING first20// • Then EDITS the loading message into the result21// • Rare outcomes22// • Direct reply to /roulette23// • No fake delays / no setTimeout24// ==========================================================25 26 27// ==========================================================28// COMMAND MESSAGE ID29// ==========================================================30 31var commandMessageId =32  request.message_id || message_id;33 34 35// ==========================================================36// GET TARGET37// ==========================================================38 39var target = null;40 41 42// ----------------------------------------------------------43// REPLY TARGET44// ----------------------------------------------------------45 46if (47  request.reply_to_message &&48  request.reply_to_message.from49) {50 51  target = request.reply_to_message.from;52 53}54 55 56// ----------------------------------------------------------57// /roulette @username58// ----------------------------------------------------------59 60if (!target) {61 62  var parts = String(message || "")63    .trim()64    .split(/\s+/);65 66  if (67    parts.length >= 2 &&68    parts[1].startsWith("@")69  ) {70 71    var username = parts[1]72      .substring(1)73      .replace(/[^a-zA-Z0-9_]/g, "");74 75    if (username.length > 0) {76 77      target = {78        first_name: username,79        username: username80      };81 82    }83 84  }85 86}87 88 89// ----------------------------------------------------------90// DEFAULT = COMMAND SENDER91// ----------------------------------------------------------92 93if (!target) {94 95  target = {96    id: user.telegramid,97    first_name: user.first_name || "You",98    last_name: user.last_name || "",99    username: user.username || ""100  };101 102}103 104 105// ==========================================================106// TARGET NAME107// ==========================================================108 109var firstName =110  target.first_name || "Unknown";111 112var lastName =113  target.last_name || "";114 115var displayName = firstName;116 117if (lastName) {118  displayName += " " + lastName;119}120 121 122// ==========================================================123// ESCAPE HTML124// ==========================================================125 126displayName = String(displayName)127  .replace(/&/g, "&amp;")128  .replace(/</g, "&lt;")129  .replace(/>/g, "&gt;");130 131 132// ==========================================================133// TARGET MENTION134// ==========================================================135 136var mention;137 138if (target.id) {139 140  mention =141    '<a href="tg://user?id=' +142    target.id +143    '">' +144    displayName +145    '</a>';146 147}148 149else if (target.username) {150 151  mention =152    "@" +153    String(target.username)154      .replace(/^@/, "");155 156}157 158else {159 160  mention = displayName;161 162}163 164 165// ==========================================================166// STEP 1 — SEND LOADING MESSAGE167// ==========================================================168 169var loading = await Api.sendMessage({170 171  chat_id: chat.id,172 173  text:174    "🎰 <b>GIFT'S ROULETTE</b>\n\n" +175 176    "🎯 <b>Player:</b> " +177    mention +178    "\n\n" +179 180    "━━━━━━━━━━━━━━━━━━\n\n" +181 182    "🎲 <b>THE WHEEL IS SPINNING...</b>\n\n" +183 184    "🔄 Calculating fate...\n" +185    "🧮 Checking probabilities...\n" +186    "👁️ Gift is watching the wheel...\n\n" +187 188    "⏳ <i>Don't blink.</i>",189 190  parse_mode: "HTML",191 192  reply_to_message_id:193    commandMessageId194 195});196 197 198// ==========================================================199// GET LOADING MESSAGE ID200// ==========================================================201 202var resultMessageId = null;203 204if (205  loading &&206  loading.result &&207  loading.result.message_id208) {209 210  resultMessageId =211    loading.result.message_id;212 213}214 215else if (216  loading &&217  loading.message_id218) {219 220  resultMessageId =221    loading.message_id;222 223}224 225 226// ==========================================================227// ROULETTE ROLL228// ==========================================================229 230var roll =231  Math.floor(Math.random() * 1000) + 1;232 233 234// ==========================================================235// RESULT VARIABLES236// ==========================================================237 238var title;239var rarity;240var emoji;241var result;242var reaction;243 244 245// ==========================================================246// 💀 ULTRA RARE247// ==========================================================248 249if (roll <= 5) {250 251  title = "REALITY ERROR";252  rarity = "🟥 ULTRA RARE";253  emoji = "💀";254 255  result =256    "The wheel stopped by itself.\n\n" +257    "That was NOT supposed to happen.";258 259  reaction =260    "Gift refuses to explain what just happened.";261 262}263 264 265// ==========================================================266// 👑 LEGENDARY267// ==========================================================268 269else if (roll <= 20) {270 271  title = "JACKPOT";272  rarity = "🟪 LEGENDARY";273  emoji = "👑";274 275  result =276    "THE WHEEL HAS BLESSED YOU.\n\n" +277    "Against all odds...\n" +278    "you actually won.";279 280  reaction =281    "Enjoy it. Your luck probably expires soon. 😭";282 283}284 285 286// ==========================================================287// 🚨 EPIC288// ==========================================================289 290else if (roll <= 60) {291 292  title = "WANTED";293  rarity = "🟨 EPIC";294  emoji = "🚨";295 296  result =297    "The wheel has selected you...\n\n" +298    "as today's primary suspect.";299 300  reaction =301    "You should probably contact your lawyer. 💀";302 303}304 305 306// ==========================================================307// 👻 RARE308// ==========================================================309 310else if (roll <= 140) {311 312  title = "GHOSTED";313  rarity = "🟦 RARE";314  emoji = "👻";315 316  result =317    "Reality has temporarily lost track of you.\n\n" +318    "You have been classified as a ghost.";319 320  reaction =321    "Nobody saw you disappear. 😭";322 323}324 325 326// ==========================================================327// 🕵️ RARE328// ==========================================================329 330else if (roll <= 260) {331 332  title = "INVESTIGATED";333  rarity = "🟦 RARE";334  emoji = "🕵️‍♀️";335 336  result =337    "Gift has opened an investigation file.\n\n" +338    "Reason:\n" +339    "<b>Suspicious vibes.</b>";340 341  reaction =342    "Please remain calm while I judge you. 🧐";343 344}345 346 347// ==========================================================348// 🔥 UNCOMMON349// ==========================================================350 351else if (roll <= 410) {352 353  title = "COOKED";354  rarity = "🟩 UNCOMMON";355  emoji = "🔥";356 357  result =358    "The wheel has spoken.\n\n" +359    "Unfortunately...\n" +360    "it does not favor you.";361 362  reaction =363    "You got cooked before the investigation started. 💀";364 365}366 367 368// ==========================================================369// 🌀 UNCOMMON370// ==========================================================371 372else if (roll <= 610) {373 374  title = "CHAOS";375 376  rarity = "🟩 UNCOMMON";377 378  emoji = "🌀";379 380  result =381    "The wheel chose chaos.\n\n" +382    "Something questionable is now inevitable.";383 384  reaction =385    "And somehow I think you're responsible. 👀";386 387}388 389 390// ==========================================================391// 🟢 COMMON392// ==========================================================393 394else if (roll <= 810) {395 396  title = "SAFE";397 398  rarity = "⬜ COMMON";399 400  emoji = "🟢";401 402  result =403    "Nothing happened.\n\n" +404    "You escaped the roulette.";405 406  reaction =407    "Boring... but congratulations. 😭";408 409}410 411 412// ==========================================================413// 🔮 MYSTERIOUS414// ==========================================================415 416else {417 418  title = "UNKNOWN";419 420  rarity = "🟪 MYSTERIOUS";421 422  emoji = "🔮";423 424  result =425    "The wheel landed on something unknown.\n\n" +426    "Even Gift doesn't know what it means.";427 428  reaction =429    "We'll find out eventually. 👁️";430 431}432 433 434// ==========================================================435// PROGRESS BAR436// ==========================================================437 438var filled =439  Math.round(roll / 100);440 441var empty =442  10 - filled;443 444if (filled > 10) {445  filled = 10;446}447 448if (filled < 0) {449  filled = 0;450}451 452empty = 10 - filled;453 454var bar = "";455 456for (var i = 0; i < filled; i++) {457  bar += "🟥";458}459 460for (var j = 0; j < empty; j++) {461  bar += "⬜";462}463 464 465// ==========================================================466// FINAL RESULT467// ==========================================================468 469var finalMessage =470 471  "🎰 <b>GIFT'S ROULETTE</b>\n\n" +472 473  "🎯 <b>Player:</b> " +474  mention +475  "\n\n" +476 477  "━━━━━━━━━━━━━━━━━━\n\n" +478 479  emoji +480  " <b>" +481  title +482  "</b>\n\n" +483 484  result +485  "\n\n" +486 487  "🏷️ <b>Rarity:</b> " +488  rarity +489  "\n\n" +490 491  "📊 <b>Wheel:</b>\n" +492  bar +493  "\n\n" +494 495  "💬 <b>Gift:</b>\n" +496  reaction +497  "\n\n" +498 499  "━━━━━━━━━━━━━━━━━━\n" +500 501  "🎲 Roll: <code>" +502  roll +503  "/1000</code>";504 505 506// ==========================================================507// EDIT LOADING MESSAGE INTO RESULT508// ==========================================================509 510if (resultMessageId) {511 512  await Api.editMessageText({513 514    chat_id: chat.id,515 516    message_id: resultMessageId,517 518    text: finalMessage,519 520    parse_mode: "HTML"521 522  });523 524}525else {526 527  // --------------------------------------------------------528  // FALLBACK529  // If Telegram didn't return the message ID,530  // send the result normally.531  // --------------------------------------------------------532 533  await Api.sendMessage({534 535    chat_id: chat.id,536 537    text: finalMessage,538 539    parse_mode: "HTML",540 541    reply_to_message_id:542      commandMessageId543 544  });545 546        }