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/_revive.js

javascript · 287 lines

Raw
1/**#command2name: /revive3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 🖤 GIFT — /revive14// FICTIONAL REVIVE GAME15//16// Usage:17//   /revive @username18//   Reply to someone's message with /revive19//20// Gift replies directly to the COMMAND USER21// and tags the TARGET.22// ==========================================================23 24 25// ----------------------------------------------------------26// GET COMMAND USER27// ----------------------------------------------------------28 29var reviverName = String(30  user.first_name || "you"31);32 33 34// ----------------------------------------------------------35// GET COMMAND MESSAGE ID36// ----------------------------------------------------------37 38var messageId = null;39 40if (request && request.message_id) {41  messageId = request.message_id;42}43 44 45// ----------------------------------------------------------46// FIND TARGET47// ----------------------------------------------------------48 49var target = null;50var targetUsername = "";51var targetId = "";52var targetName = "";53 54 55// ----------------------------------------------------------56// TARGET FROM REPLY57// ----------------------------------------------------------58 59if (60  request &&61  request.reply_to_message &&62  request.reply_to_message.from63) {64  target = request.reply_to_message.from;65}66 67 68// ----------------------------------------------------------69// TARGET FROM @USERNAME70// ----------------------------------------------------------71 72var input = String(params || "").trim();73 74if (!target && input) {75 76  var firstArg = input.split(/\s+/)[0];77 78  if (firstArg.charAt(0) === "@") {79    targetUsername = firstArg.substring(1).trim();80  }81}82 83 84// ----------------------------------------------------------85// HELPER — ESCAPE HTML86// ----------------------------------------------------------87 88function escapeHTML(text) {89 90  return String(text || "")91    .replace(/&/g, "&amp;")92    .replace(/</g, "&lt;")93    .replace(/>/g, "&gt;")94    .replace(/"/g, "&quot;")95    .replace(/'/g, "&#39;");96}97 98 99// ----------------------------------------------------------100// NO TARGET101// ----------------------------------------------------------102 103if (!target && !targetUsername) {104 105  var noTargetMessage = {106    text:107      "🖤 <b>Gift:</b> " +108      escapeHTML(reviverName) +109      ", revive who exactly?\n\n" +110      "Reply to someone's message with <code>/revive</code>\n" +111      "or use <code>/revive @username</code>.",112    parse_mode: "HTML"113  };114 115  if (messageId) {116    noTargetMessage.reply_to_message_id = messageId;117  }118 119  Api.sendMessage(noTargetMessage);120 121  return;122}123 124 125// ----------------------------------------------------------126// BUILD TARGET MENTION127// ----------------------------------------------------------128 129var targetMention = "";130 131if (target) {132 133  targetId = String(134    target.id ||135    target.telegramid ||136    ""137  );138 139  var firstName = String(140    target.first_name ||141    ""142  ).trim();143 144  var lastName = String(145    target.last_name ||146    ""147  ).trim();148 149  targetName = (150    firstName + " " + lastName151  ).trim();152 153 154  // --------------------------------------------------------155  // FALLBACK NAME156  // --------------------------------------------------------157 158  if (!targetName) {159 160    targetName = target.username161      ? "@" + target.username162      : "that user";163  }164 165 166  // --------------------------------------------------------167  // CLICKABLE TELEGRAM MENTION168  // --------------------------------------------------------169 170  if (targetId) {171 172    targetMention =173      '<a href="tg://user?id=' +174      targetId +175      '">' +176      escapeHTML(targetName) +177      "</a>";178 179  } else if (target.username) {180 181    targetMention =182      "@" +183      escapeHTML(target.username);184 185  } else {186 187    targetMention =188      escapeHTML(targetName);189  }190 191} else {192 193  targetMention =194    "@" +195    escapeHTML(targetUsername);196}197 198 199// ----------------------------------------------------------200// COLD / NONCHALANT REVIVE RESPONSES201// ----------------------------------------------------------202 203var responses = [204 205  "🖤 " + escapeHTML(reviverName) +206  ", you want " + targetMention +207  " back? Fine. They're alive. Don't make it a habit.",208 209  "💀➡️🖤 " + targetMention +210  " has been revived. You're welcome, " +211  escapeHTML(reviverName) + ".",212 213  "🖤 " + escapeHTML(reviverName) +214  ", I brought " + targetMention +215  " back. Try not to get them killed again.",216 217  "😐 " + targetMention +218  " is alive again. Whatever. Don't expect me to care.",219 220  "🖤 " + targetMention +221  " has returned. " +222  escapeHTML(reviverName) +223  ", your request has been handled.",224 225  "💀 " + targetMention +226  " was dead for approximately long enough. They're back now.",227 228  "🖤 Reviving " +229  targetMention +230  "... done. Next.",231 232  "😑 " +233  escapeHTML(reviverName) +234  " asked, so " +235  targetMention +236  " gets another chance. Don't waste it.",237 238  "🖤 " +239  targetMention +240  " has been restored. I really hope this was worth interrupting me for.",241 242  "☠️➡️🖤 " +243  targetMention +244  " is back. The universe can complain later."245];246 247 248// ----------------------------------------------------------249// RANDOM RESPONSE250// ----------------------------------------------------------251 252var response =253  responses[254    Math.floor(255      Math.random() * responses.length256    )257  ];258 259 260// ----------------------------------------------------------261// FINAL MESSAGE262// ----------------------------------------------------------263 264var finalMessage = {265  text:266    "🖤 <b>GIFT REVIVE SYSTEM</b>\n\n" +267    response +268    "\n\n" +269    "🎮 <i>Fictional game action.</i>",270  parse_mode: "HTML"271};272 273 274// ----------------------------------------------------------275// REPLY DIRECTLY TO /revive276// ----------------------------------------------------------277 278if (messageId) {279  finalMessage.reply_to_message_id = messageId;280}281 282 283// ----------------------------------------------------------284// SEND285// ----------------------------------------------------------286 287Api.sendMessage(finalMessage);