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

javascript · 119 lines

Raw
1/**#command2name: /delsudo3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 💜 GIFT AI — /UNADMIN14// BOT OWNER ONLY15// REPLIES DIRECTLY TO OWNER16//17// Usage:18// /unadmin 12345678919//20// • Only the bot owner can remove admins21// • Owner cannot be removed22// ==========================================================23 24// 👑 BOT OWNER ID25var OWNER_ID = 8031061590;26 27// ----------------------------------------------------------28// CHECK OWNER29// ----------------------------------------------------------30 31if (String(user.telegramid) != String(OWNER_ID)) {32  return Bot.sendMessage(33    "❌ Access denied.\n\nOnly the bot owner can remove bot admins."34  );35}36 37// ----------------------------------------------------------38// GET USER ID39// ----------------------------------------------------------40 41var parts = message.trim().split(/\s+/);42 43if (parts.length < 2) {44  return Bot.sendMessage(45    "❌ Missing user ID.\n\n" +46    "Usage:\n" +47    "/unadmin 123456789"48  );49}50 51var targetId = parts[1];52 53// ----------------------------------------------------------54// VALIDATE ID55// ----------------------------------------------------------56 57if (!/^-?\d+$/.test(targetId)) {58  return Bot.sendMessage(59    "❌ Invalid Telegram user ID."60  );61}62 63// ----------------------------------------------------------64// PROTECT OWNER65// ----------------------------------------------------------66 67if (String(targetId) == String(OWNER_ID)) {68  return Bot.sendMessage(69    "👑 You cannot remove the bot owner."70  );71}72 73// ----------------------------------------------------------74// GET ADMINS75// ----------------------------------------------------------76 77var admins = Bot.getProperty("GIFT_BOT_ADMINS");78 79if (!Array.isArray(admins)) {80  admins = [];81}82 83// ----------------------------------------------------------84// FIND ADMIN85// ----------------------------------------------------------86 87var index = admins.indexOf(String(targetId));88 89if (index === -1) {90  return Bot.sendMessage(91    "⚠️ That user is not a Gift bot admin."92  );93}94 95// ----------------------------------------------------------96// REMOVE ADMIN97// ----------------------------------------------------------98 99admins.splice(index, 1);100 101Bot.setProperty(102  "GIFT_BOT_ADMINS",103  admins,104  "json"105);106 107// ----------------------------------------------------------108// SUCCESS — REPLY DIRECTLY TO COMMAND109// ----------------------------------------------------------110 111Bot.sendMessage(112  "🗑 <b>BOT ADMIN REMOVED</b>\n\n" +113  "🆔 ID: <code>" + targetId + "</code>\n" +114  "✅ This user is no longer a Gift bot admin.",115  {116    parse_mode: "HTML",117    reply_to_message_id: request.message_id118  }119);