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

javascript · 217 lines

Raw
1/**#command2name: /id3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 🆔 GIFT AI — /ID14// ACCURATE • FAST • ERROR-SAFE15//16// PRIVATE CHAT:17// • Shows user's ID18//19// GROUP / SUPERGROUP:20// • Shows user's ID21// • Shows GC ID22//23// REPLY:24// • Shows replied user's ID25// • Shows current GC ID when used in a group26// ==========================================================27 28 29// ----------------------------------------------------------30// 👤 DETERMINE TARGET USER31// ----------------------------------------------------------32 33var target = null;34 35try {36 37  // If /id is used as a reply,38  // show the replied user's information39  if (40    request &&41    request.reply_to_message &&42    request.reply_to_message.from43  ) {44 45    target = request.reply_to_message.from;46  }47 48  // Otherwise show the person who used /id49  else if (50    request &&51    request.from52  ) {53 54    target = request.from;55  }56 57} catch (e) {58 59  target = null;60}61 62 63// ----------------------------------------------------------64// 🚫 SAFETY CHECK65// ----------------------------------------------------------66 67if (!target || !target.id) {68 69  Bot.sendMessage({70    text:71      "⚠️ <b>Unable to get the user's information.</b>\n\n" +72      "Please try <code>/id</code> again.",73    parse_mode: "HTML",74    reply_to_message_id:75      request && request.message_id76        ? request.message_id77        : undefined78  });79 80  return;81}82 83 84// ----------------------------------------------------------85// 🆔 USER ID86// ----------------------------------------------------------87 88var userId = String(target.id);89 90 91// ----------------------------------------------------------92// 👤 USER NAME93// ----------------------------------------------------------94 95var name =96  target.first_name ||97  target.username ||98  "User";99 100name = String(name);101 102 103// ----------------------------------------------------------104// 🛡️ ESCAPE HTML105// ----------------------------------------------------------106 107name = name108  .replace(/&/g, "&amp;")109  .replace(/</g, "&lt;")110  .replace(/>/g, "&gt;")111  .replace(/"/g, "&quot;")112  .replace(/'/g, "&#39;");113 114 115// ----------------------------------------------------------116// 🔗 CLICKABLE TELEGRAM PROFILE117// ----------------------------------------------------------118 119var profileLink =120  '<a href="tg://user?id=' +121  userId +122  '">' +123  name +124  '</a>';125 126 127// ----------------------------------------------------------128// 💬 CHECK IF CURRENT CHAT IS A GROUP129// ----------------------------------------------------------130 131var isGroup = false;132 133try {134 135  if (136    chat &&137    (138      chat.type === "group" ||139      chat.type === "supergroup"140    )141  ) {142 143    isGroup = true;144  }145 146} catch (e) {147 148  isGroup = false;149}150 151 152// ----------------------------------------------------------153// 🆔 RESPONSE154// ----------------------------------------------------------155 156var message =157  "🆔 <b>USER INFORMATION</b>\n\n" +158  "👤 <b>User:</b> " + profileLink + "\n" +159  "🔢 <b>User ID:</b> <code>" + userId + "</code>";160 161 162// ----------------------------------------------------------163// 👥 ADD GROUP ID164// ----------------------------------------------------------165 166if (isGroup) {167 168  var groupId = String(chat.id);169 170  var groupName = "";171 172  try {173 174    if (chat.title) {175      groupName = String(chat.title);176    }177 178  } catch (e) {179 180    groupName = "";181  }182 183 184  // Escape group name185  groupName = groupName186    .replace(/&/g, "&amp;")187    .replace(/</g, "&lt;")188    .replace(/>/g, "&gt;")189    .replace(/"/g, "&quot;")190    .replace(/'/g, "&#39;");191 192 193  message +=194    "\n\n👥 <b>GROUP INFORMATION</b>\n\n" +195    "🏷️ <b>Group:</b> " +196    (groupName197      ? groupName198      : "Current Group") +199    "\n" +200    "🆔 <b>Group ID:</b> <code>" +201    groupId +202    "</code>";203}204 205 206// ----------------------------------------------------------207// 📤 SEND AS DIRECT REPLY208// ----------------------------------------------------------209 210Bot.sendMessage({211  text: message,212  parse_mode: "HTML",213  reply_to_message_id:214    request && request.message_id215      ? request.message_id216      : undefined217});