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

javascript · 187 lines

Raw
1/**#command2name: unban_execute3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 👑 GIFT AI — /unban_execute14// EXECUTE ADMIN UNBAN15// ==========================================================16 17 18// ==========================================================19// GET ADMIN20// ==========================================================21 22var adminId = String(user.id);23 24 25// ==========================================================26// GET SAVED DATA27// ==========================================================28 29var chatId =30  Bot.getProperty(31    "UNBAN_CHAT_" + adminId32  );33 34var targetId =35  Bot.getProperty(36    "UNBAN_TARGET_" + adminId37  );38 39var targetName =40  Bot.getProperty(41    "UNBAN_NAME_" + adminId42  );43 44var commandId =45  Bot.getProperty(46    "UNBAN_COMMAND_" + adminId47  );48 49 50// ==========================================================51// SAFETY CHECK52// ==========================================================53 54if (55  !chatId ||56  !targetId57) {58 59  Bot.sendMessage({60    text:61      "⚠️ <b>Unban request expired.</b>\n\n" +62      "Please try /unban again.",63    parse_mode: "HTML"64  });65 66  return;67}68 69 70// ==========================================================71// CHECK ADMIN RESULT72// ==========================================================73 74var member = options.result || {};75 76var status =77  String(member.status || "");78 79 80// ==========================================================81// ADMIN ONLY82// ==========================================================83 84if (85  status !== "administrator" &&86  status !== "creator"87) {88 89  Bot.sendMessage({90    text:91      "⛔ <b>ADMIN ONLY</b>\n\n" +92      "You don't have permission to use /unban.",93    parse_mode: "HTML"94  });95 96  return;97}98 99 100// ==========================================================101// UNBAN102// ==========================================================103 104Api.unbanChatMember({105  chat_id: Number(chatId),106  user_id: Number(targetId)107});108 109 110// ==========================================================111// ESCAPE HTML112// ==========================================================113 114function esc(text) {115 116  return String(text || "")117    .replace(/&/g, "&amp;")118    .replace(/</g, "&lt;")119    .replace(/>/g, "&gt;")120    .replace(/"/g, "&quot;")121    .replace(/'/g, "&#039;");122}123 124 125// ==========================================================126// USER TAG127// ==========================================================128 129var mention =130  '<a href="tg://user?id=' +131  String(targetId) +132  '">' +133  esc(targetName || "User") +134  '</a>';135 136 137// ==========================================================138// FINAL RESPONSE139// ==========================================================140 141var msg = {142  text:143    "🔓 <b>USER UNBANNED</b>\n\n" +144    "👤 <b>User:</b> " + mention + "\n" +145    "✅ <b>Status:</b> Unbanned\n\n" +146    "🛡️ <i>Gift has handled it.</i>",147  parse_mode: "HTML"148};149 150 151// ==========================================================152// REPLY TO ADMIN'S /unban COMMAND153// ==========================================================154 155if (commandId) {156 157  msg.reply_to_message_id =158    Number(commandId);159}160 161 162// ==========================================================163// SEND164// ==========================================================165 166Api.sendMessage(msg);167 168 169// ==========================================================170// CLEANUP171// ==========================================================172 173Bot.deleteProperty(174  "UNBAN_CHAT_" + adminId175);176 177Bot.deleteProperty(178  "UNBAN_TARGET_" + adminId179);180 181Bot.deleteProperty(182  "UNBAN_NAME_" + adminId183);184 185Bot.deleteProperty(186  "UNBAN_COMMAND_" + adminId187);